From b6c14bca65c2922354d24ee411ea7a85b30d0065 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 13 Mar 2015 15:00:51 +0100 Subject: MySQL: Fix test so it expects the right integer type Change-Id: Idd90d7881c6458fac7602bf02dad0f794d3b98c9 Reviewed-by: Eskil Abrahamsen Blomfeldt --- tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/sql/kernel') 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()); -- cgit v1.2.3