diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-24 16:27:08 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-24 16:29:14 +0200 |
commit | f82e5085169876e0ec7c1b744d021b068c281cfe (patch) | |
tree | a870e1f68ce62818a0793c4c78a67971e841e676 /tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | |
parent | f74d4fb1dacc682e2e6f4a44e4240f642a2c3b70 (diff) | |
parent | ee47999333dde1d38b73d04e142e05f06f8c56ed (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
mkspecs/features/qt_common.prf
src/corelib/tools/qstring.cpp
src/plugins/platforms/windows/qwindowsmousehandler.cpp
src/widgets/widgets/qmainwindowlayout_p.h
Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
Diffstat (limited to 'tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp')
-rw-r--r-- | tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index 23c8460133..c64310a715 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -2070,8 +2070,6 @@ void tst_QSqlQuery::prepare_bind_exec() const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest_prepare(qTableName("qtest_prepare", __FILE__, db)); - if (dbType == QSqlDriver::Interbase && (db.databaseName() == "silence.nokia.troll.no:c:\\ibase\\testdb_ascii" || db.databaseName() == "/opt/interbase/qttest.gdb")) - QSKIP("Can't transliterate extended unicode to ascii"); if (dbType == QSqlDriver::DB2) QSKIP("Needs someone with more Unicode knowledge than I have to fix"); @@ -2347,6 +2345,16 @@ void tst_QSqlQuery::prepare_bind_exec() QCOMPARE(q.value(0).toInt(), 107); QCOMPARE(q.value(1).toString(), QString("name")); QCOMPARE(q.value(2).toString(), QString("107")); + + // Test just duplicated placeholders + QVERIFY(q.prepare("insert into " + qtest_prepare + " (id, name, name2) values (110, :name, :name)")); + q.bindValue(":name", "name"); + QVERIFY_SQL(q, exec()); + QVERIFY(q.exec("select * from " + qtest_prepare + " where id > 109 order by id")); + QVERIFY(q.next()); + QCOMPARE(q.value(0).toInt(), 110); + QCOMPARE(q.value(1).toString(), QString("name")); + QCOMPARE(q.value(2).toString(), QString("name")); } // end of SQLite scope } |