Bug #32057 MySQL ODBC 3.51 Driver crashes ODBC Administrator
Submitted: 2 Nov 2007 16:48 Modified: 7 Jul 2008 15:25
Reporter: Theo Hultberg Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51.21 and 5.1 OS:Mac OS X (Mac OS X 10.4 Intel and 10.5 Intel)
Assigned to: Jim Winstead CPU Architecture:Any

[2 Nov 2007 16:48] Theo Hultberg
Description:
I have installed the MySQL ODBC driver from the .pkg distribution. The driver crashes ODBC Administrator every time I try to add a new DSN. The crash occurs once you click "ok" to add the driver, after having entered all the details.

This is the output in console.log:

--------------------------------------------------------------------
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8060; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8090; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e80e0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8110; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8140; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8170; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e81a0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e81d0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8200; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8230; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8260; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8290; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e82c0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e82f0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8320; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8350; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
ODBC Administrator(21622,0xa000d000) malloc: ***  Deallocation of a pointer not malloced: 0x3e8380; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Nov  2 17:39:41 babel crashdump[21659]: ODBC Administrator crashed
Nov  2 17:39:42 babel crashdump[21659]: crash report written to: /Users/theo/Library/Logs/CrashReporter/ODBC Administrator.crash.log
--------------------------------------------------------------------

I have tested this on a MacBook Pro (Intel processor) and an Mac Mini (Intel processor) with the same result.

How to repeat:
1. Install MySQL ODBC 3.51 (package format)
2. Open ODBC Administrator
3. Select the System DSN tab
4. Click Add
5. Select MySQL ODBC 3.51 Driver
6. Enter: 
    Data Source Name: test
    Description: test
    Server: test
    User: <a user name>
    Password: <the user's password>
    Database: test
7. Click Ok

After a few seconds ODBC Administrator crashes

Suggested fix:
Judging from the output in the console there are some memory allocation problems.
[2 Nov 2007 16:50] Theo Hultberg
The ODB Administrator crash log

Attachment: ODBC Administrator.crash.log (, text), 146.37 KiB.

[2 Nov 2007 17:08] Theo Hultberg
Changed a typo
[7 Nov 2007 15:15] Susanne Ebrecht
Many thanks for reporting a bug.

Please, could you add the trace file here.
[8 Nov 2007 8:56] Theo Hultberg
I'm confused as to which trace file you want me to add, is not the output above enough? Please provide an explanation how I can create a trace file, and I'll do my best to provide you with one.
[8 Nov 2007 10:29] Theo Hultberg
ODBC Administrator crash log (Mac OS X 10.5)

Attachment: ODBC Administrator_2007-11-08-112522_babel.crash (, text), 19.87 KiB.

[8 Nov 2007 10:31] Theo Hultberg
I have tested on Mac OS X 10.5 and there is no difference from my initial report (which was on Mac OS X 10.4.10). I have attached the crash log above.
[8 Nov 2007 23:38] Jim Winstead
I have reproduced this on Mac OS X 10.5.

Thanks for the report.
[12 Nov 2007 9:26] Sveta Smirnova
Bug #31972 was marked as duplicate of this one.
[13 Nov 2007 15:23] Susanne Ebrecht
Hi Theo,

you wrote in how to repeat:

6. Enter: 
    Data Source Name: test
    Description: test
    Server: test
    User: <a user name>
    Password: <the user's password>
    Database: test

I can't believe, that you have a server in your private network, with the hostname test.

Please, fill out here the right server name. If you use the same machine, it's localhost or 127.0.0.1
[13 Nov 2007 15:28] Theo Hultberg
Seems I was a bit quick, you are right that it should be localhost. I have, however, tried with remote servers as well, as well as with other databases than test. The values are not representative in that way. The bug lies elsewhere.
[13 Nov 2007 16:08] Jim Winstead
Sorry, I'm not sure why this was reopened. I've verified this bug on Mac OS X 10.5, with a similar trace to what was reported. There's no need to verify this any further.
[2 Jan 2008 18:58] Nathan Hadfield
Having the same problem (on Mac OS X 10.5 Intel). I can create User DSNs, even though the ODBC Administrator app crashes when I add them, but when I try to create a System DSN, ODBC Adminstrator crashes and upon relaunch the new DSN appears in the User DSN list.

Is there a workaround for creating System DSNs? If not, can the Severity level be escalated to Critical?

Thanks very much.
[7 Jan 2008 14:01] Nic Brown
I am running Mac OS X 10.5.1 and am having the same problem as Nathan.  Adding the connection under "System DSN" results in a crash and the connection showing up only in "User DSN".  I'm attempting to connect to mySQL 4.0.21-standard but seeing the same issue.

Any update to this bug as I really need to connect back to a database with FileMaker.

Thanks.
[8 Jan 2008 16:33] Zachary Schneider
I am having the same problem. Adding user DSNs are fine regardless of host and database settings. Trying to add a system DSN results in a crash and a user DSN being created that is viewable after reopening the closed app.

Please upgrade this bug, there is no other way to connect with filemaker to mysql.
[8 Jan 2008 19:08] Craig Ledebur
I honestly don't understand why the severity is "Non-critical" as it is impossible to use the ODBC driver within Leopard because of the bug. In essence, the bug is severe enough to affect an entire segment of the user base; namely those that run Leopard.
[14 Jan 2008 12:23] Theo Hultberg
This bug affects both Mac OS X 10.4 and 10.5 and likely all versions before those. I changed the severity to critical, not sure if that's up to me, but it's critical because the driver likely doesn't work at all on the Mac platform.
[9 Apr 2008 18:48] Jim Winstead
This problem stems from trying to use a driver compiled on Mac OS X 10.4 on 10.5. We're going to start releasing 10.5 builds of C/ODBC with the next releases (3.51.25, 5.1.4), and they don't exhibit this problem.
[9 Apr 2008 18:55] Theo Hultberg
Jim, if you look more closely this bug was first filed for 10.4 and then confirmed on 10.5 as well (it says so quite clearly in the message before yours). There can be other problems with using the connector on 10.5, but the specific problem reported here exists on 10.4 too.
[22 Apr 2008 23:09] Graham Mitchell
Just to confirm, I've just downloaded and installed the driver on Mac OS X 10.4.11 and it simply does not work with ODBC Administrator. I can only create a User DSN, which is not what I need, and the driver crashes ODBC Administrator every time.
[6 May 2008 17:51] B Adams
Trace of libmyodbc3s.so-related ODBC administrator crash on 10.5.2(PPC)

Attachment: ppc_odbc_crashtrace.txt (text/plain), 20.83 KiB.

[6 May 2008 21:05] Tek Mason
I can confirm the same symptoms on 10.4.11.

Unfortunately, I am stuck because FileMaker Pro does not seem to be able to use a User DSN.  I'm not so sure that the MySQL ODBC Driver User DSNs are right either as Excel can not see any of them

Is there a work around or an old (package) version of the MySQL ODBC Driver for 10.4?

I'm a Mac newbie...Is there any way that I can help with this bug?

thx
[7 Jul 2008 15:25] Tony Bedford
An entry has been added to the 5.1.4 and 3.51.25 Changelogs:

The driver crashes ODBC Administrator on attempting to add a new DSN.
[30 Jul 2008 5:59] Scott Steven
This bug is getting very old I am working on a project and would like to know if any one has an update on this as to ETA etc.
[30 Jul 2008 7:41] Nathan Hadfield
Until this bug gets fixed (hopefully soon!?), here is a workaround for setting up an ODBC data source on Mac OS X 10.5, from our good friends at LANrev.com. Although the instructions say to use the 3.5.1 driver, the latest driver seems to work as well.

(The instructions describe creating a data source for a LANrev MySQL database.)

Installing the MyODBC 3.5.1 Driver
====
1. Download the "Mac OS X (TAR packages) download" for 10.4 tar ball from 
	http://dev.mysql.com/downloads/connector/odbc/3.51.html#macosx
2. Extract the file, go into the folder containing the binaries (mysql-connector-odbc-3.51.22-osx10.4-architecture-32bit), and run the following commands.
	sudo mkdir /usr/local/myodbc /usr/local/myodbc/bin /usr/local/myodbc/lib
	sudo cp bin/* /usr/local/myodbc/bin/
	sudo cp lib/* /usr/local/myodbc/lib/
3. Launch ODBC Administrator and click the lock in the lower left hand so you can make changes and register the MySQL ODBC driver.
4. Switch to the Drivers tab and click the Add button. Fill out the fields as follows.
	Description: MySQL ODBC 3.51 Driver
	Driver file: /usr/local/myodbc/lib/libmyodbc3-3.51.22.so
	Setup file:
	Define as: System

Creating a Data Source
====
1. Switch to the System DSN tab, click the Add button, select the MySQL ODBC 3.51 Driver, and fill out the fields as follows.
	Data Source Name (DSN): LANrev
	Description:
2. Add 2 keywords, click OK and then Apply, and then edit /Library/ODBC/odbcinst.ini. Edit the old text to the new text.

-=OLD=-
[LANrev]
Driver      = /usr/local/myodbc/lib/libmyodbc3-3.51.22.so
Description =
Key         = Value
Key1        = Value

-=NEW=-
[LANrev]
Driver      = /usr/local/myodbc/lib/libmyodbc3-3.51.22.so
Description =
Server      = 127.0.0.1
Database    = LANrev
[30 Jul 2008 10:15] Tonci Grgin
Nathan, thanks for sharing this workaround with others. This is true essence of BugsDB.