[ODBC-177] Deadlock error not reported correctly back to client application when using Connector/ODBC Created: 2018-08-31  Updated: 2020-08-25  Resolved: 2018-09-06

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 2.0.11
Fix Version/s: 2.0.18, 3.0.7

Type: Bug Priority: Major
Reporter: Chris Calender (Inactive) Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Environment:

MariaDB Connector/ODBC 2.0.11 64-bit



 Description   

Deadlocks in nested stored procedures are not propagating the deadlock error back to the application properly when using Connector/ODBC.

Attached is an ODBC Trace when calling a SP. You can see that the call to NextResult() returned SQL_NO_DATA_FOUND, and not the error.

And per Georg:

"Afaik the problem is here: https://github.com/MariaDB/mariadb-connector-odbc/blob/master/ma_result.c#L95

if mysql_stmt_next_result failed, the function should return an error. SQL_NO_DATA is ok, if field_count is zero"



 Comments   
Comment by Lawrin Novitsky [ 2018-08-31 ]

I guess that is not about deadlocks, and nested procedures, but more generally - for any query returning > 1 results, and where 2nd or later statement's result is an error

Comment by Lawrin Novitsky [ 2018-09-06 ]

The fix and the testcase have been pushed into odbc-3.0
Commit 871f483 (will be diff in odbc-2.0)

Generated at Thu Feb 08 03:26:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.