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

Reading an invalid DATE value might throws unchecked exceptions instead of SQLException

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.5.11
    • Other
    • None

    Description

      With the default sql_mode (no NO_ZERO_IN_DATE), the server accepts and stores dates with a zero day or month, for example:

      CREATE TABLE t (a DATE);
      INSERT INTO t VALUES ('2000-03-00');

      Reading such a value with several getters makes the driver throw exceptions that are not SQLException, which applications do not catch and whose message does not say which value was at fault

      A JDBC getter must report a value it cannot represent through an SQLException only.

      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.