summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2016-08-22 14:32:05 +0200
committerMilian Wolff <milian.wolff@kdab.com>2016-09-12 12:47:08 +0000
commit3370ab9119df09ca14f7d4641c555e60c1b3f478 (patch)
treed3710534e5bf8235ab7f2e81b37ad542b8e7df71 /src/widgets
parent3b8df0ea44b048b8fcc4317ffdfd074e2547a95e (diff)
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 194403a3483b7317cc9511bc8b2ab307775643c5. Change-Id: I028a3abd83fdd2b42d98d478950d205e5b6bbeb5 Task-number: QTBUG-53397 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/widgets')
0 files changed, 0 insertions, 0 deletions