Multi-threading patch

This was done by Michael Krause.
https://lists.sqlitebrowser.org/pipermail/db4s-dev/2018-February/000305.html

In this commit I only fixed two compiler warnings, some whitespace
issues and removed some debug messages.
This commit is contained in:
Martin Kleusberg
2018-05-21 18:13:56 +02:00
parent 9c2cec628b
commit 51dbe72e23
19 changed files with 1466 additions and 344 deletions

View File

@@ -607,7 +607,8 @@ bool ImportCsvDialog::importCsv(const QString& fileName, const QString& name)
sQuery.chop(1); // Remove last comma
sQuery.append(")");
sqlite3_stmt* stmt;
sqlite3_prepare_v2(pdb->_db, sQuery.toUtf8(), sQuery.toUtf8().length(), &stmt, nullptr);
auto pDb = pdb->get("importing CSV");
sqlite3_prepare_v2(pDb.get(), sQuery.toUtf8(), sQuery.toUtf8().length(), &stmt, nullptr);
// Parse entire file
size_t lastRowNum = 0;