Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0, 5.7.0 RC
-
None
-
Os doesn't seem to matter Windows 10 and CentOs 7
-
10d977993445f2794f1dd8c88b2e83517ef524f3
Description
It seems that since Qt 5.6 QSqlQuery doesn't play well with mysql UNSIGNED datatype flag. Well here's an exmaple. We have mysql table table with following definition: CREATE TABLE sql_test(id INT AUTO_INCREMENT PRIMARY KEY,
test_number TINYINT(3) UNSIGNED); . Field test_number can hold 0-255 since it's TINYINT and UNSIGNED. But since QSqlQuery doesn't care for UNSIGNED flag it breaks when field value reaches 128. What's worring me is that it breaks out of while loop w/o crashing or throwing any exceptions and end result is incomplete without us knowing it. Attached screenshot has example application with sql data and output.