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

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.3.2, 1.3.1, 1.3.3, 1.3.4, 1.3.5
    • 1.3.6
    • Other
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.