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

trouble with 'year(4)' type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.3.6, 1.3.7, 1.4.1, 1.4.2
    • Fix Version/s: 1.4.3
    • Component/s: Other
    • Labels:
      None
    • Environment:
      MySQL server 5.6.28

      Description

      Hi,

      Since Connector/J version 1.3.6 (everything working well with 1.3.4 and 1.3.5) and
      still reproducible with version 1.4.2, there is a exception getting values from
      a '`year` year(4) DEFAULT NULL' column.

      Here is the top of the exception stack:
      {{
      java.lang.ArrayIndexOutOfBoundsException: 2
      at org.mariadb.jdbc.internal.queryresults.MariaDbValueObject.binaryDate(MariaDbValueObject.java:1019)
      at org.mariadb.jdbc.internal.queryresults.MariaDbValueObject.getDate(MariaDbValueObject.java:945)
      at org.mariadb.jdbc.internal.queryresults.MariaDbValueObject.getObject(MariaDbValueObject.java:1425)
      at org.mariadb.jdbc.MariaDbResultSet.getObject(MariaDbResultSet.java:971)
      ...
      }}

      I suspect then that the rawdata is parsed as a full date value and then failing to
      get month and day parts of it.

      Regards

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: