From 3cd7289548c00fe2dcbe790ab4be4f4eca1d4fb3 Mon Sep 17 00:00:00 2001 From: Bill King Date: Tue, 16 Jun 2009 15:14:25 +1000 Subject: Fixes to get some MS Sql Server tests running again + new db definitions. --- tests/auto/qsqldatabase/tst_databases.h | 8 +++++++- tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/auto/qsqldatabase/tst_databases.h b/tests/auto/qsqldatabase/tst_databases.h index 5b0fc7a..340d479 100644 --- a/tests/auto/qsqldatabase/tst_databases.h +++ b/tests/auto/qsqldatabase/tst_databases.h @@ -251,6 +251,10 @@ public: // addDb( "QODBC", "DRIVER={MySQL ODBC 3.51 Driver};SERVER=mysql5-nokia.trolltech.com.au;DATABASE=testdb", "testuser", "Ee4Gabf6_", "" ); // addDb( "QODBC", "DRIVER={FreeTDS};SERVER=horsehead.nokia.troll.no;DATABASE=testdb;PORT=4101;UID=troll;PWD=trondk", "troll", "trondk", "" ); // addDb( "QODBC", "DRIVER={FreeTDS};SERVER=silence.nokia.troll.no;DATABASE=testdb;PORT=2392;UID=troll;PWD=trond", "troll", "trond", "" ); +// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2003-x86-01.apac.nokia.com;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_", "testuser", "Ee4Gabf6_", "" ); +// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2008-x86-01.apac.nokia.com;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_", "testuser", "Ee4Gabf6_", "" ); +// addDb( "QTDS7", "testdb", "testuser", "Ee4Gabf6_", "bq-winserv2003" ); +// addDb( "QTDS7", "testdb", "testuser", "Ee4Gabf6_", "bq-winserv2008" ); } void open() @@ -424,7 +428,9 @@ public: { return db.databaseName().contains( "sql server", Qt::CaseInsensitive ) || db.databaseName().contains( "sqlserver", Qt::CaseInsensitive ) - || db.databaseName().contains( "sql native client", Qt::CaseInsensitive ); + || db.databaseName().contains( "sql native client", Qt::CaseInsensitive ) + || db.databaseName().contains( "bq-winserv", Qt::CaseInsensitive ) + || db.hostName().contains( "bq-winserv", Qt::CaseInsensitive ); } static bool isMSAccess( QSqlDatabase db ) diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 4fa3dc4..1a5eac3 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -296,6 +296,9 @@ void tst_QSqlDatabase::createTestTables(QSqlDatabase db) // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script q.exec("set table_type=innodb"); + if (tst_Databases::isSqlServer(db)) { + QVERIFY_SQL(q, exec("SET ANSI_DEFAULTS ON")); + } // please never ever change this table; otherwise fix all tests ;) if (tst_Databases::isMSAccess(db)) { -- cgit v0.12