[CONJ-987] Version 3.0.0 returns String for VARBINARY instead of byte[] as 2.7.6 did Created: 2022-07-04 Updated: 2022-07-20 Resolved: 2022-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | 2.7 compatibility |
| Affects Version/s: | 3.0.6 |
| Fix Version/s: | 3.0.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jens Schauder | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
A query for a field of type VARBINARY used to return a byte[] up until version 2.7.6 It now returns a String. Is this intentional? Or is this a regression? |
| Comments |
| Comment by Jens Schauder [ 2022-07-04 ] |
|
There is a reproducer here https://github.com/schauder/issue-CONJ-987 Switching between the two driver versions in the POM demonstrate the change in behaviour when running the test. |
| Comment by Jens Schauder [ 2022-07-04 ] |
|
This issue blocks https://github.com/spring-projects/spring-data-relational/issues/1281 |
| Comment by Russell Hunt [ 2022-07-06 ] |
|
There are probably other changes required, but the primary change should be in getDefaultCodec() in It currently returns a StringCodec.INSTANCE for VARSTRING (and some other types). SQL VARBINARY seems to be represented as a data type VARSTRING with charset 63 (binary) in the code. Presumably, for VARSTRING (and STRING and others?) the method getDefaultCodec() should say: |
| Comment by Diego Dupin [ 2022-07-20 ] |
|
right, this is a clearly a regression, and Hunt correction is accurate. This will be part of next release 3.0.7 (before the end of the month). |