Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When executing a single query, getGeneratedKey currently might return a resultset with multiple keys.
example :
INSERT INTO testMultiGeneratedKey (text) VALUES ('someValue'), ('someOtherValue');
But MariaDB protocol returns only one OK_Packet indicating first automatically generated Id and number of affected rows.
This can cause alternate issues like INSERT ...ON DUPLICATE KEY that return 2 affected rows in case of existing ID. (And so returning 2 rows in getGeneratedKey)
Driver must not trying to be better than what server returns.