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

MySQL Connector Incompatible result from Statement.execute for out-of-range value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.2
    • 3.4.0
    • MySQL compatibility
    • Windows 11
      MariaDB Connector 3.1.2
      MySQL Connector 8.0.32
      MariaDB 10.11

    Description

      Hey there,

      I use different connectors(MySQL / MariaDB Connector) to connect to the same MariaDB. My connection URL is like "jdbc:mariadb://localhost:3366/test?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB,sql_mode=''&connectionTimeZone=UTC" and "jdbc:mysql://localhost:3366/test?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB,sql_mode=''&connectionTimeZone=UTC"
      and the setup SQL file:

      DROP DATABASE IF EXISTS database0;
      CREATE DATABASE database0;
      USE database0;
      CREATE OR REPLACE TABLE t0(c0 REAL UNSIGNED UNIQUE, PRIMARY KEY(c0));
      INSERT INTO t0 VALUES (-1006215717);
      

      I execute this file using Statement.execute().

      But the MySQL Connector and MariaDB Connector seem to have different results when executing the last line 'INSERT INTO t0 VALUES (-1006215717);'.
      That is, MySQL Connector returns 'com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Out of range value for column 'c0' at row 1' but MariaDB Connector can successfully insert to the table.

      I classify this as a bug because MariaDB claims MySQL compatibility at the driver level.

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              dwenking chaos
              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.