diff options
author | Andy Shaw <andy.shaw@digia.com> | 2015-03-13 15:00:51 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2015-03-20 13:51:34 +0000 |
commit | b6c14bca65c2922354d24ee411ea7a85b30d0065 (patch) | |
tree | dec2966e65b589b522eda15d9fcb133b93c48ce5 /tests/auto/sql/kernel | |
parent | 392d861790a7cff9d01344a02bf245209f32970f (diff) |
MySQL: Fix test so it expects the right integer type
Change-Id: Idd90d7881c6458fac7602bf02dad0f794d3b98c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'tests/auto/sql/kernel')
-rw-r--r-- | tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index d2b4474dd4..61586eb841 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -3829,7 +3829,7 @@ void tst_QSqlQuery::aggregateFunctionTypes() QVariant::Type intType = QVariant::Int; // QPSQL uses LongLong for manipulation of integers const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); - if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::PostgreSQL) + if (dbType == QSqlDriver::PostgreSQL) intType = QVariant::LongLong; else if (dbType == QSqlDriver::Oracle) intType = QVariant::Double; @@ -3875,7 +3875,7 @@ void tst_QSqlQuery::aggregateFunctionTypes() QVERIFY_SQL(q, exec("SELECT COUNT(id) FROM " + tableName)); QVERIFY(q.next()); QCOMPARE(q.value(0).toInt(), 2); - QCOMPARE(q.record().field(0).type(), intType); + QCOMPARE(q.record().field(0).type(), dbType != QSqlDriver::MySqlServer ? intType : QVariant::LongLong); QVERIFY_SQL(q, exec("SELECT MIN(id) FROM " + tableName)); QVERIFY(q.next()); @@ -3918,7 +3918,7 @@ void tst_QSqlQuery::aggregateFunctionTypes() QVERIFY_SQL(q, exec("SELECT COUNT(id) FROM " + tableName)); QVERIFY(q.next()); QCOMPARE(q.value(0).toInt(), 2); - QCOMPARE(q.record().field(0).type(), intType); + QCOMPARE(q.record().field(0).type(), dbType != QSqlDriver::MySqlServer ? intType : QVariant::LongLong); QVERIFY_SQL(q, exec("SELECT MIN(id) FROM " + tableName)); QVERIFY(q.next()); |