Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
1.4.0, 1.4.1, 1.4.2
-
None
-
Fedora Core 23 x64, connecting to 10.1.13-MariaDB MariaDB Server
Description
When inserting a new row using a PreparedStatement into a table with an auto incremented ID, the connector returns a negative ID if the actual generated ID is greater than 32767.
I've nailed this down to this method: org.mariadb.jdbc.internal.util.buffer.Buffer.getLengthEncodedBinary()
In version 1.3.7, where this still works, the method contains this snippet:
case (byte) 0xfc: //252 |
return (long) 0xffff & readShort(); |
In version 1.4.2, where it's broken, it looks like this:
case 252: |
return readShort(); |
I think this bug is insanely critical.