summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@theqtcompany.com>2016-06-13 19:09:15 +0200
committerJesus Fernandez <jesus.fernandez@theqtcompany.com>2016-06-14 11:13:11 +0000
commit8e889378115c69508b050a511621ac8e30ec4158 (patch)
tree678108f14450bc634392e2895240710fd84154ef /src/sql
parente5e93345c5befc1d0891bdf53db4d7d2ccfc8cd0 (diff)
Fix UNSIGNED values in QMYSQL
The unsigned flag in columns was ignored when creating the list of bound values in a mysql table. So the result iteration with QSqlQuery::next stops after the first wrong truncated value. [ChangeLog][QtSql] Fixed QSqlQuery::prepare value truncation error when using UNSIGNED values in a MySQL database. Task-number: QTBUG-53969 Task-number: QTBUG-53237 Change-Id: I10d977993445f2794f1dd8c88b2e83517ef524f3 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index 96bdcc42fa..55bf499e42 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -387,6 +387,7 @@ bool QMYSQLResultPrivate::bindInValues()
bind->buffer_length = f.bufLength = fieldInfo->length + 1;
bind->is_null = &f.nullIndicator;
bind->length = &f.bufLength;
+ bind->is_unsigned = fieldInfo->flags & UNSIGNED_FLAG ? 1 : 0;
f.outField=field;
++i;