summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
diff options
context:
space:
mode:
authorBill King <bking@trolltech.com>2009-07-08 01:17:40 (GMT)
committerBill King <bking@trolltech.com>2009-07-08 01:17:40 (GMT)
commitb2e62931f1b2968a69aa013b27a50d2e6beb4e27 (patch)
tree81e01b6ad99c48fd90ac797a07870f8522327312 /tests/auto/qsqldatabase/tst_qsqldatabase.cpp
parent5ff22b1ed4da11dc16a236825c939b5ae38d27cc (diff)
downloadQt-b2e62931f1b2968a69aa013b27a50d2e6beb4e27.zip
Qt-b2e62931f1b2968a69aa013b27a50d2e6beb4e27.tar.gz
Qt-b2e62931f1b2968a69aa013b27a50d2e6beb4e27.tar.bz2
Cleanup more SQL autotest failures.
Diffstat (limited to 'tests/auto/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
index 21064c3..025e895 100644
--- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
@@ -256,6 +256,8 @@ static int createFieldTable(const FieldDef fieldDefs[], QSqlDatabase db)
QString autoName = tst_Databases::autoFieldName(db);
if (tst_Databases::isMSAccess(db))
qs.append(" (id int not null");
+ else if (tst_Databases::isPostgreSQL(db))
+ qs.append(" (id serial not null");
else
qs.append(QString("(id integer not null %1 primary key").arg(autoName));
@@ -1350,6 +1352,8 @@ void tst_QSqlDatabase::transaction()
}
QVERIFY_SQL(q, exec("select * from " + qTableName("qtest") + " where id = 41"));
+ if(db.driverName().startsWith("QODBC") && dbName.contains("MySQL"))
+ QEXPECT_FAIL("", "Some odbc drivers don't actually roll back despite telling us they do, especially the mysql driver", Continue);
QVERIFY(!q.next());
populateTestTables(db);
@@ -1427,7 +1431,8 @@ void tst_QSqlDatabase::caseSensivity()
bool cs = false;
if (db.driverName().startsWith("QMYSQL")
|| db.driverName().startsWith("QSQLITE")
- || db.driverName().startsWith("QTDS"))
+ || db.driverName().startsWith("QTDS")
+ || db.driverName().startsWith("QODBC"))
cs = true;
QSqlRecord rec = db.record(qTableName("qtest"));