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

SQLDataException reading DATA_TYPE on DatabaseMetaData.getTypeInfo() after 3.0.4

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 3.0.4, 3.0.5, 3.0.6
    • 3.0.7
    • JDBC compatibility
    • None
    • Windows 10, jdk 17.0.3, connecting to MySQL 8.0.29 and MariaDb 10.8.3

    Description

      There was a change from version 3.0.3 ->3.0.4, that broke our usage of the MariaDb connector. The change was related to CONJ-923, and specifically the changes to IntCodec.java on the commit c999c2ec1d396d947bc30515aefed00e65937c18.

      What is happening is, while reading the database metadata, specifically reading the resultset of DatabaseMetaData.getTypeInfo(), for the row with TYPE_NAME = "BIT", we are getting a SQLDataException for "int overflow" when we try to get ResultSet.getInt("DATA_TYPE"), which the value is -7 but it seems that it's flagged as an unsigned integer, honesty I'm not sure if throwing this exception was intended for this cenario.

      We use this same class for reading different databases metadata, including mariaDb and MySQL, and never had a problem before version 3.0.4, where a validation in IntCodec, previously only done for BIGINT column types was moved out of the switch case.

      So I would like to check if this change was intended.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            lucas.galvao Lucas Collares Favaron Galvao
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.