summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp2
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp18
2 files changed, 16 insertions, 4 deletions
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 9a873cb..f3dd920 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -495,7 +495,9 @@ void tst_QSqlQuery::mysqlOutValues()
QVERIFY_SQL( q, exec( "create procedure " + qTableName( "qtestproc" ) + " () "
"BEGIN select * from " + qTableName( "qtest" ) + " order by id; END" ) );
QVERIFY_SQL( q, exec( "call " + qTableName( "qtestproc" ) + "()" ) );
+ QEXPECT_FAIL("", "There's a mysql bug that means only selects think they return data when running in prepared mode", Continue);
QVERIFY_SQL( q, next() );
+ QEXPECT_FAIL("", "There's a mysql bug that means only selects think they return data when running in prepared mode", Continue);
QCOMPARE( q.value( 1 ).toString(), QString( "VarChar1" ) );
QVERIFY_SQL( q, exec( "drop procedure " + qTableName( "qtestproc" ) ) );
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index d934b35..1e23d3d 100644
--- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -145,8 +145,17 @@ void tst_QSqlRelationalTableModel::recreateTestTables(QSqlDatabase db)
void tst_QSqlRelationalTableModel::initTestCase()
{
- foreach (const QString &dbname, dbs.dbNames)
- recreateTestTables(QSqlDatabase::database(dbname));
+ foreach (const QString &dbname, dbs.dbNames) {
+ QSqlDatabase db=QSqlDatabase::database(dbname);
+ if (db.driverName().startsWith("QIBASE"))
+ db.exec("SET DIALECT 3");
+ else if (tst_Databases::isSqlServer(db)) {
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("SET ANSI_DEFAULTS ON"));
+ QVERIFY_SQL(q, exec("SET IMPLICIT_TRANSACTIONS OFF"));
+ }
+ recreateTestTables(db);
+ }
}
void tst_QSqlRelationalTableModel::cleanupTestCase()
@@ -490,6 +499,7 @@ void tst_QSqlRelationalTableModel::insertWithStrategies()
model.setTable(qTableName("reltest1"));
model.setRelation(2, QSqlRelation(qTableName("reltest2"), "tid", "title"));
+ model.setSort(0, Qt::AscendingOrder);
if (!db.driverName().startsWith("QTDS"))
model.setRelation(3, QSqlRelation(qTableName("reltest2"), "tid", "title"));
@@ -914,8 +924,8 @@ void tst_QSqlRelationalTableModel::casing()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
- if (db.driverName().startsWith("QSQLITE"))
- QSKIP("The casing test for SQLITE is irrelevant since SQLITE is case insensitive", SkipAll);
+ if (db.driverName().startsWith("QSQLITE") || db.driverName().startsWith("QIBASE") || tst_Databases::isSqlServer(db))
+ QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities", SkipAll);
QSqlQuery q(db);
QVERIFY_SQL( q, exec("create table " + qTableName("CASETEST1", db.driver()).toUpper() +