Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
Windows 64-bit, Linux 64-bit
Description
We are seeing that during array inserts, MariaDB populates SQL_PARAM_DIAG_UNAVAILABLE for each failed rows (in our case it was a duplicate key for a primary key column) instead of expected SQL_PARAM_ERROR. For example, let's say my table has 4 rows already; and my program tries to insert 6 rows with SQL_ATTR_PARAMSET_SIZE set to 6 itself; out of 6 rows, 4 are duplicate keys which would result in failures and eventually only 2 rows will get inserted to the database. After SQLExecute(), I'm seeing my SQL_ATTR_PARAM_STATUS_PTR values like
{1, 1, 1, 1, 0, 0}; where 1 indicates SQL_PARAM_DIAG_UNAVAILABLE.
Due to this our statistics reports for each execution reports incorrect information to our users.
– response from Lawrin Novitsky <lawrin.novitsky@mariadb.com> (2016-Nov-18):
It looks like a bug. I think we are able to return SQL_PARAM_ERROR and not just SQL_PARAM_DIAG_UNAVAILABLE. I can fix that. Especially if you file the bug ![]()