[ODBC-94] Crash in ODBC Driver SQLExecDirect() Created: 2017-04-28  Updated: 2017-05-04  Resolved: 2017-05-03

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 3.0.0
Fix Version/s: 3.0.1, 2.0.15

Type: Bug Priority: Major
Reporter: Chris Clark Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: crash
Environment:

Windows 32-bit


Attachments: File odbc_grant.c    

 Description   

Using 32-bit download from https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.0.0/win_connector_odbc/ attached test case odbc_grant.c causes a crash in the driver.

The expected behavior is for SQLExecDirect() to return an error.

Test case works as expected with with mysql-connector-odbc-5.3.7-win32



 Comments   
Comment by Lawrin Novitsky [ 2017-05-01 ]

Thank you for your bug report.
Please try version 2.0.14(http://downloads.mariadb.com/Connectors/odbc/connector-odbc-2.0.14/win_connector_odbc/) - it returns error and does not crash for me.
3.0.0 connector is of alpha quality at the moment.
I will verify that the fix is correctly merged to the 3.0 branch, and then close this issue.

Comment by Chris Clark [ 2017-05-02 ]

I uninstalled ODBC v3, and installed mariadb-connector-odbc-2.0.14-win32.msi as suggested with no change, (still crashes). I still have "MariaDB Connector C" version 3.0.1 installed.

Comment by Chris Clark [ 2017-05-02 ]

removing "MariaDB Connector C" version 3.0.1 and leaving ODBC driver has no effect either.

Comment by Lawrin Novitsky [ 2017-05-02 ]

Ok, I used your complete test case. And yes, it crashes, but not during execution, but later during error processing in the call of SQLGetDiagRec. And only if you use ODBCv2. if you uncomment #define use_odbc_v3, everything will be fine.
I will fix that. Thanks once again for your report.
p.s. btw there was no need to install/uninstall Connector/C. Yes, C/ODBC uses C/C, but we link it statically

Comment by Lawrin Novitsky [ 2017-05-03 ]

Fix and testcase has been pushed in daaf929 commit

Comment by Chris Clark [ 2017-05-03 ]

https://github.com/MariaDB/mariadb-connector-odbc/commit/daaf929f66d168ad796e35acba17bf854c37ddde fix in ODBC 2.0 branch

Comment by Lawrin Novitsky [ 2017-05-04 ]

Oops, yes, I gave the wrong commit id. Thank you, I've changed that now

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