From 9b68dc19bf3973d3a46439c4b8667ad3beba167d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 22 Feb 2018 13:45:34 +0100 Subject: MySQL: Fix tests This fixes the following: - tst_QSqlDatabase::recordMySQL() to account for performance improvements done for small integral types - tst_QSqlQuery::nextResult() so that NUMERIC results are seen as doubles - tst_QSqlQuery::timeStampParsing() so that MySQL accepts the CREATE TABLE statement Change-Id: I68fb1d06dac12d500bb4596463f5bdd65cc9c226 Reviewed-by: Edward Welbourne --- tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp') diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 89978319a0..4130b364f4 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -890,10 +890,10 @@ void tst_QSqlDatabase::recordMySQL() static QDateTime dt(QDate::currentDate(), QTime(1, 2, 3, 0)); static const FieldDef fieldDefs[] = { - FieldDef("tinyint", QVariant::Int, 127), - FieldDef("tinyint unsigned", QVariant::UInt, 255), - FieldDef("smallint", QVariant::Int, 32767), - FieldDef("smallint unsigned", QVariant::UInt, 65535), + FieldDef("tinyint", static_cast(QMetaType::Char), 127), + FieldDef("tinyint unsigned", static_cast(QMetaType::UChar), 255), + FieldDef("smallint", static_cast(QMetaType::Short), 32767), + FieldDef("smallint unsigned", static_cast(QMetaType::UShort), 65535), FieldDef("mediumint", QVariant::Int, 8388607), FieldDef("mediumint unsigned", QVariant::UInt, 16777215), FieldDef("integer", QVariant::Int, 2147483647), -- cgit v1.2.3