diff options
author | Bill King <bill.king@nokia.com> | 2009-05-21 04:27:27 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-05-21 04:29:01 (GMT) |
commit | 7383e03bfd473f6e79718f3da7d504977a677541 (patch) | |
tree | 9935f00930da3275a1584425d0998fc95381e5f8 /src/sql/drivers/mysql | |
parent | 2cb36aed053147ecc91f72ed76074962a66b76f0 (diff) | |
download | Qt-7383e03bfd473f6e79718f3da7d504977a677541.zip Qt-7383e03bfd473f6e79718f3da7d504977a677541.tar.gz Qt-7383e03bfd473f6e79718f3da7d504977a677541.tar.bz2 |
Fixes one of the fields of mysql bound params not initialised.
Found by valgrind, value isn't set but is used, fixes this.
Reviewed-by: Justin McPherson
Diffstat (limited to 'src/sql/drivers/mysql')
-rw-r--r-- | src/sql/drivers/mysql/qsql_mysql.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index 51fc306..53645c9 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -927,6 +927,7 @@ bool QMYSQLResult::exec() nullVector[i] = static_cast<my_bool>(val.isNull()); currBind->is_null = &nullVector[i]; currBind->length = 0; + currBind->is_unsigned = 0; switch (val.type()) { case QVariant::ByteArray: @@ -973,7 +974,6 @@ bool QMYSQLResult::exec() currBind->buffer_type = MYSQL_TYPE_DOUBLE; currBind->buffer = data; currBind->buffer_length = sizeof(double); - currBind->is_unsigned = 0; break; case QVariant::LongLong: case QVariant::ULongLong: @@ -989,7 +989,6 @@ bool QMYSQLResult::exec() currBind->buffer_type = MYSQL_TYPE_STRING; currBind->buffer = const_cast<char *>(ba.constData()); currBind->buffer_length = ba.length(); - currBind->is_unsigned = 0; break; } } } |