[CONJ-1047] Version 2.7.8 vs Version 3.x.y - ERROR 1406 Created: 2023-01-31 Updated: 2023-03-13 |
|
| Status: | Open |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Liviu Coman | Assignee: | Diego Dupin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, I'm using mariadb jdbc connector 2.7.8 to access a mariadb 10.3.23 Unfortunately I've noticed that ERROR 1406 is not triggered on 3.x.z. Consider the table marks:
-------
------- Error I'm trying to produce with a junit: Issue found on 3.0.x and 3.1.x |
| Comments |
| Comment by Liviu Coman [ 2023-01-31 ] | ||
|
I'm using spring-jdbc and I can't find this line for 3.x.z 2023-01-31 14:55:45,778 [main] [] DEBUG support.SQLErrorCodeSQLExceptionTranslator:407 - Translating SQLException with SQL state '22001', error code '1406', message [(conn=1289) Data too long for column | ||
| Comment by Diego Dupin [ 2023-02-02 ] | ||
|
Could you share @sql_mode value ? (i.e. result of "select @@sql_mode;") 2.x was ensuring that state, issuing an additional command for each connection, but now that this is default for all supported server version, choice is to have fast connection without any additional command. | ||
| Comment by Liviu Coman [ 2023-03-13 ] | ||
|
on 2.7.8 I see this output
on 3.1.2 I see this output
| ||
| Comment by Liviu Coman [ 2023-03-13 ] | ||
|
in order to use jdbc driver version 3.1.2 following session variable "sql_mode" has to be set
|