[ODBC-67] SQL_ATTR_PARAM_STATUS_PTR reports SQL_PARAM_DIAG_UNAVAILABLE instead of SQL_PARAM_ERROR Created: 2016-11-18 Updated: 2017-05-15 |
|
| Status: | Open |
| Project: | MariaDB Connector/ODBC |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Rahul Dhuvad | Assignee: | Lawrin Novitsky |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
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): |
| Comments |
| Comment by Lawrin Novitsky [ 2017-02-25 ] |
|
Reading here about SQL_ATTR_PARAM_STATUS_PTR I think we've done that for purpose, since we have diagnostic information only for last executed paramset. And we return SQL_PARAM_ERROR only if it has occurred on the last paramset. |