Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53969

QSqlQuery doesn't respect mysql USIGNED flag and breaks on ::next()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.2
    • 5.6.0, 5.7.0 RC
    • SQL Support
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jefernan Jesus Fernandez
            rikko Rikko Salu
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes