Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.2
-
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
- is caused by
-
CONJ-1163 jdbcCompliantTruncation Does Not Appear To Be Working
- Closed