diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-01-17 09:02:29 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-02-21 07:07:26 +0000 |
commit | 8635ad1b59d49dfdc20132d5d12dbd7e6e478214 (patch) | |
tree | 2f6ea2cccffa5a6c600f4aaef94f8e69942818a4 /tests/auto/sql/kernel | |
parent | 8dbd245979dac890c9317a27067a43205314a4f0 (diff) |
psql: Add expected failures where the table name is case sensitive
Currently there is a bug in Qt regarding the PostgreSQL driver as it
does not correctly escape the table names when constructing queries
internally. Therefore, these tests are marked as expected failures until
the bug itself is fixed in Qt.
Change-Id: I74dadc187f8a08509128dfea27be99787e57ea51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/sql/kernel')
-rw-r--r-- | tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index aba99a9e20..a51865897f 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -2711,10 +2711,9 @@ void tst_QSqlQuery::lastInsertId() QSqlQuery q( db ); - const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // PostgreSQL >= 8.1 relies on lastval() which does not work if a value is // manually inserted to the serial field, so we create a table specifically - if (dbType == QSqlDriver::PostgreSQL) { + if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL) { const auto tst_lastInsertId = qTableName("tst_lastInsertId", __FILE__, db); tst_Databases::safeDropTable(db, tst_lastInsertId); QVERIFY_SQL(q, exec(QStringLiteral("create table ") + tst_lastInsertId + @@ -3681,6 +3680,8 @@ void tst_QSqlQuery::QTBUG_5251() QSqlTableModel timetestModel(0,db); timetestModel.setEditStrategy(QSqlTableModel::OnManualSubmit); timetestModel.setTable(timetest); + if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL) + QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort); QVERIFY_SQL(timetestModel, select()); QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("01:02:03.666")); |