Hello, I am using the community version of sqlcipher built with vcpkg and qt 6.5.0. I made my own sqlcipher driver based on the built-in qt sqlite driver, I changed almost nothing in the code, basically only the name of the driver class. The driver was connected to the project through the plugin and directly through driver registration (this does not affect the problem in any way). I create a database with a password, and when registering or authorizing the database during queries, my application freezes for 2-3-4 seconds, if you do not set a password for the database, then the queries go through quickly. My code is something like this:
QSqlDatabase currentUserDb = QSqlDatabase::addDatabase(“SQLITECIPHER”, user);
currentUserDb.open();
QSqlQuery query(currentUserDb);
query.exec(“pragma key = '” + password + “';”);// I also tried using sqlite3_key, same effect
QString str = “create table if not exists data(id integer primary key autoincrement, there are 5 more TEXT type names”;
query.exec(str)//this is already starting to hang
// etc. further queries also hang if the query to create a table is removed.
Hangups should be like this (I have an old PC, an amd a8-6600k processor)? Or incorrectly assembled the driver, or some other reason?
Update: hangs only in the application built via mingw in the release version, it does not hang in the debug version. Through msvc it does not hang in debug and release versions, although it used to hang in the release version too, but not in debug. I don’t know what I did to stop hanging in the release version via msvc, maybe changing the compiler to a newer version in the settings helped, but I’m not sure. This is some kind of mystic.