Bug #60758 Calling SQLConfigDataSource with "MySQL ODBC 5.1 Driver" causes crash
Submitted: 5 Apr 2011 7:42 Modified: 28 May 2013 13:15
Reporter: Jimmie Johnsson Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.1.8 OS:Windows (Windows 7 32-bit)
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: crash, MySQL ODBC 5.1 Driver, SQLConfigDataSource

[5 Apr 2011 7:42] Jimmie Johnsson
Description:
After making a sucessfull call to SQLConfigDataSource (odbccp32.dll) with the "MySQL ODBC 5.1 Driver" you get (after a short delay) the "program.exe has stopped working" dialog from windows with the following details:
"
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	Program.exe
  Application Version:	1.0.0.0
  Application Timestamp:	00000000
  Fault Module Name:	ntdll.dll
  Fault Module Version:	6.1.7601.17514
  Fault Module Timestamp:	4ce7b96e
  Exception Code:	80000003
  Exception Offset:	000a1827
  OS Version:	6.1.7601.2.1.0.256.48
  Locale ID:	1053
  Additional Information 1:	d1ab
  Additional Information 2:	d1ab624ec7d094c26a73530c245a3468
  Additional Information 3:	d1ab
  Additional Information 4:	d1ab624ec7d094c26a73530c245a3468
"

I've verified that the problem lays with the driver by making the exact same call to SQLConfigDataSource with another driver ("Microsoft Access Driver (*.mdb)"), changing driver to use fixes the problem.

So simply switching from:
bool status = SQLConfigDataSource(NULL, ODBC_ADD_DSN, "MySQL ODBC 5.1 Driver", (const char *)attribString);

to:
bool status = SQLConfigDataSource(NULL, ODBC_ADD_DSN, "Microsoft Access Driver (*.mdb)", (const char *)attribString);

solves it, meaning the problem must be with the driver (the attribString is the exact same in both calls).

Dont know if it matters but the development is done in embarcadero RAD studio 2010.

How to repeat:
1. Make a successfull call to SQLConfigDataSource with "MySQL ODBC 5.1 Driver"
2. Wait a few second.
3. Crash.
[3 May 2011 10:15] Bogdan Degtyariov
Jimmie,

Thank you for reporting the bug.
Please note that SQLConfigDataSource() is neither defined nor used in any of MySQL Connector/ODBC components (driver, GUI or command line utils).

Can you attach the ODBC trace, so we could see what is happening and why?
Thanks.
[16 Jun 2011 4:14] Bogdan Degtyariov
Thank you for this bug report. To properly diagnose the problem, we need an ODBC trace to see what is happening behind the scenes.
Once you have generated the ODBC trace, please submit it to this bug report and change the status back to 'Open'. Thank you for helping us make our products better.
[16 Jul 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 May 2013 13:15] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.