Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-255

Resultset.getBoolean result on value that differ 0 and 1

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.2, 1.3.1, 1.3.3, 1.3.4, 1.3.5
    • Fix Version/s: 1.3.6
    • Component/s: Other
    • Labels:
      None

      Description

      Driver return false when using Resultset.getBoolean on tinyInt with value > 1.
      (That differ from the mysql driver which return true is this case.)

      At the same time :

      mysql> SELECT IF(0, 'true', 'false');
      +------------------------+
      | IF(0, 'true', 'false') |
      +------------------------+
      | false                  |
      +------------------------+
       
      mysql> SELECT IF(1, 'true', 'false');
      +------------------------+
      | IF(1, 'true', 'false') |
      +------------------------+
      | true                   |
      +------------------------+
       
      mysql> SELECT IF(2, 'true', 'false');
      +------------------------+
      | IF(2, 'true', 'false') |
      +------------------------+
      | true                   |
      +------------------------+
       

      This is inconsistent, driver must handle the same way

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration