diff options
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 7 | ||||
-rw-r--r-- | tests/auto/qsqlquery/tst_qsqlquery.cpp | 49 |
2 files changed, 0 insertions, 56 deletions
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 38e4a63..8294a55 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -104,7 +104,6 @@ class QSQLiteDriverPrivate public: inline QSQLiteDriverPrivate() : access(0) {} sqlite3 *access; - QList <QSQLiteResult *> results; }; @@ -287,12 +286,10 @@ QSQLiteResult::QSQLiteResult(const QSQLiteDriver* db) { d = new QSQLiteResultPrivate(this); d->access = db->d->access; - db->d->results.append(this); } QSQLiteResult::~QSQLiteResult() { - qobject_cast<const QSQLiteDriver *>(driver())->d->results.removeOne(this); d->cleanup(); delete d; } @@ -556,10 +553,6 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c void QSQLiteDriver::close() { if (isOpen()) { - foreach (QSQLiteResult *result, d->results) { - result->d->finalize(); - } - if (sqlite3_close(d->access) != SQLITE_OK) setLastError(qMakeError(d->access, tr("Error closing database"), QSqlError::ConnectionError)); diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp index 652a82e..3cbdb63 100644 --- a/tests/auto/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp @@ -215,8 +215,6 @@ private slots: void QTBUG_14132(); void QTBUG_21884_data() { generic_data("QSQLITE"); } void QTBUG_21884(); - void QTBUG_16967_data() { generic_data("QSQLITE"); } - void QTBUG_16967(); //clean close void sqlite_constraint_data() { generic_data("QSQLITE"); } void sqlite_constraint(); @@ -3152,53 +3150,6 @@ void tst_QSqlQuery::QTBUG_21884() } } -/** - * This test case test sqlite driver close function. Sqlite driver should close cleanly - * even if there is still outstanding prepared statement. - */ -void tst_QSqlQuery::QTBUG_16967() -{ - QFETCH(QString, dbName); - { - QSqlDatabase db = QSqlDatabase::database(dbName); - CHECK_DATABASE(db); - db.close(); - QCOMPARE(db.lastError().type(), QSqlError::NoError); - } - { - QSqlDatabase db = QSqlDatabase::database(dbName); - CHECK_DATABASE(db); - QSqlQuery q(db); - q.prepare("CREATE TABLE t1 (id INTEGER PRIMARY KEY, str TEXT);"); - db.close(); - QCOMPARE(db.lastError().type(), QSqlError::NoError); - } - { - QSqlDatabase db = QSqlDatabase::database(dbName); - CHECK_DATABASE(db); - QSqlQuery q(db); - q.prepare("CREATE TABLE t1 (id INTEGER PRIMARY KEY, str TEXT);"); - q.exec(); - db.close(); - QCOMPARE(db.lastError().type(), QSqlError::NoError); - } - { - QSqlDatabase db = QSqlDatabase::database(dbName); - CHECK_DATABASE(db); - QSqlQuery q(db); - q.exec("INSERT INTO t1 (id, str) VALUES(1, \"test1\");"); - db.close(); - QCOMPARE(db.lastError().type(), QSqlError::NoError); - } - { - QSqlDatabase db = QSqlDatabase::database(dbName); - CHECK_DATABASE(db); - QSqlQuery q(db); - q.exec("SELECT * FROM t1;"); - db.close(); - QCOMPARE(db.lastError().type(), QSqlError::NoError); - } -} void tst_QSqlQuery::oraOCINumber() { |