qt5base-lts/tests/auto/sql/kernel
Milian Wolff 3370ab9119 Never return char variants when reading prepared MySQL statements
This has undesired effects when converting a QSqlRecord to JSON.
A char(0) e.g. has special semantics that are undesired when
reading a Tinyint column.

I don't think that returning bool for the special case of a
Tinyint(1) is required. This also did not happen before, and
is also not happening when not using a prepared statement.
Instead, a plain int/uint QVariant is returned.

This patch extends tst_QSqlQuery::integralTypesMysql to also
cover reading and writing booleans from/to a MySQL table column
of type Tinyint(1). Additionally, the reading is now also done
with a prepared statement and we also check the raw variant
value.

The broken behavior fixed by this patch was introduced by me in
commit 194403a348.

Change-Id: I028a3abd83fdd2b42d98d478950d205e5b6bbeb5
Task-number: QTBUG-53397
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-09-12 12:47:08 +00:00
..
qsql fix usage of wince scope 2015-06-05 10:29:10 +00:00
qsqldatabase Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-29 11:13:41 +01:00
qsqldriver fix usage of wince scope 2015-06-05 10:29:10 +00:00
qsqlerror tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-29 11:35:53 +00:00
qsqlfield Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlquery Never return char variants when reading prepared MySQL statements 2016-09-12 12:47:08 +00:00
qsqlrecord Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlresult Update copyright headers 2015-02-11 06:49:51 +00:00
qsqlthread fix usage of wince scope 2015-06-05 10:29:10 +00:00
kernel.pro SQL: Change in QSqlResultPrivate::positionalToNamedBinding() 2012-12-10 21:23:35 +01:00