summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-12-05 06:06:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-12-05 06:06:46 (GMT)
commita1640ce50e9350df64fca984a3454a72e31f0ef7 (patch)
tree80c369d115452d794480734bde2150934bf07602 /tests
parent91814c0a9d32b5a306037a73c067c02d3f5be4ff (diff)
parent235e4fb7316cfe65605c3a035cf3a4f0d167335c (diff)
downloadQt-a1640ce50e9350df64fca984a3454a72e31f0ef7.zip
Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.gz
Qt-a1640ce50e9350df64fca984a3454a72e31f0ef7.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Correct client rect calculation for MCL Symbian: Fix CBA display on application with multiple windows Fix def files doc - document symbian behaviour of QFile::link Symbian - prefer sessions started by this process to choose proxy Freezing Def files in Qt Lightmaps demo Symbian fix CBA comes on top of option menu Fix memory leaks in OpenVG and OpenGL resource pools Fix sqlite driver memory eating due to close failure
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 3cbdb63..652a82e 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -215,6 +215,8 @@ 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();
@@ -3150,6 +3152,53 @@ 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()
{