diff options
author | axis <qt-info@nokia.com> | 2009-05-11 06:30:34 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-05-11 06:30:34 (GMT) |
commit | 804a0ff4ad8c27ece2d403b8d9a4f6f65cdcf867 (patch) | |
tree | 0258fb5f685ccaa710f8ea8ec9da9b6aa9f91d35 /tests/auto/qsqldatabase/tst_qsqldatabase.cpp | |
parent | efb3e7288eec748db11c35de87239a1eff4d457c (diff) | |
parent | 842ba1b3878c2973b24936b18a7ee55bdd980be6 (diff) | |
download | Qt-804a0ff4ad8c27ece2d403b8d9a4f6f65cdcf867.zip Qt-804a0ff4ad8c27ece2d403b8d9a4f6f65cdcf867.tar.gz Qt-804a0ff4ad8c27ece2d403b8d9a4f6f65cdcf867.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
tests/auto/qtemporaryfile/qtemporaryfile.pro
Diffstat (limited to 'tests/auto/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r-- | tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 665cfde..66cf81f 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -517,6 +517,8 @@ void tst_QSqlDatabase::tables() // MySQL doesn't give back anything when calling QSqlDatabase::tables() with QSql::Views // May be fixable by doing a select on informational_schema.views instead of using the client library api QEXPECT_FAIL("", "MySQL driver thinks that views are tables", Continue); + if(!tables.contains(qTableName("qtest_view"), Qt::CaseInsensitive)) + qDebug() << "failed to find" << qTableName("qtest_view") << "in" << tables; QVERIFY(tables.contains(qTableName("qtest_view"), Qt::CaseInsensitive)); } if (tempTables) @@ -1881,17 +1883,26 @@ void tst_QSqlDatabase::ibase_procWithReturnValues() "\nRESULT INTEGER)" "\nAS" "\nbegin" - "\nRESULT = 10;" + "\nRESULT = 10 * ABC;" "\nsuspend;" "\nend")); // Interbase procedures can be executed in two ways: EXECUTE PROCEDURE or SELECT QVERIFY_SQL(q, exec(QString("execute procedure %1(123)").arg(procName))); QVERIFY_SQL(q, next()); - QCOMPARE(q.value(0).toInt(), 10); + QCOMPARE(q.value(0).toInt(), 1230); QVERIFY_SQL(q, exec(QString("select result from %1(456)").arg(procName))); QVERIFY_SQL(q, next()); - QCOMPARE(q.value(0).toInt(), 10); + QCOMPARE(q.value(0).toInt(), 4560); + QVERIFY_SQL(q, prepare(QLatin1String("execute procedure ")+procName+QLatin1String("(?)"))); + q.bindValue(0, 123); + QVERIFY_SQL(q, exec()); + QVERIFY_SQL(q, next()); + QCOMPARE(q.value(0).toInt(), 1230); + q.bindValue(0, 456); + QVERIFY_SQL(q, exec()); + QVERIFY_SQL(q, next()); + QCOMPARE(q.value(0).toInt(), 4560); q.exec(QString("drop procedure %1").arg(procName)); } @@ -2277,7 +2288,7 @@ void tst_QSqlDatabase::db2_valueCacheUpdate() void tst_QSqlDatabase::sqlStatementUseIsNull_189093() { - // NULL = NULL is unknow, the sqlStatment must use IS NULL + // NULL = NULL is unknown, the sqlStatment must use IS NULL QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); |