Hi all,

I've noticed that QSqlDatabase::transaction() and QSqlDriver::beginTransaction() don't work when using QSQLITE driver.

Using QSqlQuery::exec("BEGIN TRANSACTION") work correctly.

It's a bug?

PS. both QSqlDatabase::transaction() and QSqlDriver::beginTransaction() return true for correct execution

Example code
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  2.  
  3. db.transaction(); // returns true
  4. for (int i = 0; i < 1000; ++i)
  5. {
  6. // INSERT data
  7. }
  8. db.commit(); // returns true
To copy to clipboard, switch view to plain text mode 
doesn't work

Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  2.  
  3. QSqlQuery q(db);
  4. q.exec("BEGIN TRANSACTION");
  5. for (int i = 0; i < 1000; ++i)
  6. {
  7. // INSERT data
  8. }
  9. q.exec("COMMIT");
To copy to clipboard, switch view to plain text mode 
works correctly.