Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
3.1.22
-
None
-
None
-
Win x86, ODBC, ADO, MariaDB ODBC Connector 3.1.22 x86, MariaDB 10.11.6 x64
Description
to reproduce null pointer exception:
1) open connection
2) restart database server service
3) my ADO execute command with earlier opened connection as follows (but maybe happens on other ODBC or libmariadb context also). See below.
4) nullptr exception is SEH exception and is not catched as com_error. Therefore fatal in my case.
try
|
{
|
_CommandPtr pCmdChange = NULL;
|
pCmdChange.CreateInstance(__uuidof(Command)); // Create command object.
|
pCmdChange->ActiveConnection = GetConnection();
|
pCmdChange->CommandText = command;
|
pCmdChange->Execute(NULL, NULL, adCmdText | adExecuteNoRecords);
|
}
|
catch (_com_error &e)
|
{
|
Log(e.Error(), e.Description());
|
return FALSE;
|
}
|
on libmariadb -> mariadb_stmt.c
see function:
int mthd_stmt_read_execute_response(MYSQL_STMT *stmt)
|
This assert hits as stmt->fields being null:
assert(stmt->fields);
|
,but there's no other error handling on this, which causes it crash on nullptr exception on fields duplicating after this.
As workaround:
replaced assert row with
if(!stmt->fields)
|
return (1);
|
Attachments
Issue Links
- relates to
-
CONCPP-150 Make the driver more resilient to reconnect event
-
- Open
-