Bug #50027 ODBC conector not working on OS X 10.6
Submitted: 2 Jan 2010 19:04 Modified: 1 Mar 2010 10:43
Reporter: Paul Konigsberg Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.1 OS:Mac OS X (10.6)
Assigned to: CPU Architecture:Any
Tags: ODBC Mac OS X 10.6

[2 Jan 2010 19:04] Paul Konigsberg
Description:
I had no problems with the ODBC connection on Mac OS X 10.5 but as soon as I changed it to Mac OS X 10.6 it stopped working. Is there a new ODBC connector for OS X 10.6? If this helps I will include a stack trace:

Stacktrace:

  at (wrapper managed-to-native) System.Data.Odbc.libodbc.SQLError (intptr,intptr,intptr,byte[],int&,byte[],int16,int16&) <0x00004>
  at (wrapper managed-to-native) System.Data.Odbc.libodbc.SQLError (intptr,intptr,intptr,byte[],int&,byte[],int16,int16&) <0xffffffff>
  at System.Data.Odbc.OdbcError..ctor (string,System.Data.Odbc.OdbcHandleType,intptr) <0x000e7>
  at System.Data.Odbc.OdbcDataReader.GetPrimaryKeysBySQLPrimaryKey (string,string,string) <0x00197>
  at System.Data.Odbc.OdbcDataReader.GetPrimaryKeys (string,string,string) <0x0004b>
  at System.Data.Odbc.OdbcDataReader.GetSchemaTable () <0x00c8c>
  at (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcDataReader.GetSchemaTable () <0xffffffff>
  at System.Data.Odbc.OdbcDataReader..ctor (System.Data.Odbc.OdbcCommand,System.Data.CommandBehavior) <0x000d6>
  at System.Data.Odbc.OdbcDataReader..ctor (System.Data.Odbc.OdbcCommand,System.Data.CommandBehavior,int) <0x00016>
  at (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcDataReader..ctor (System.Data.Odbc.OdbcCommand,System.Data.CommandBehavior,int) <0xffffffff>
  at System.Data.Odbc.OdbcCommand.ExecuteReader (System.Data.CommandBehavior) <0x0003c>
  at System.Data.Odbc.OdbcCommand.ExecuteReader () <0x00012>
  at System.Data.Odbc.OdbcCommand.ExecuteScalar () <0x0001d>

How to repeat:
Try a moderately complex query (with an INNER JOIN) on Mac OS X 10.6.2, Mysql v 5.1.24-rc and let me know what ODBC connector works.

Suggested fix:
New ODBC driver for OS X 10.6
[12 Jan 2010 10:30] Geert Vanderkelen
Not really ODBC savvy, but using iodbc to test the driver MacOS X 10.5 driver on 10.6, it doesn't work at all (see below).
Compiling from source is also no solution.

-Geert

$ iodbctest
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008

Enter ODBC connect string (? shows list): ? 

DSN                              | Driver                                  
------------------------------------------------------------------------------
myodbc                           | MySQL ODBC 5.1 Driver                   

Enter ODBC connect string (? shows list): myodbc
1: SQLDriverConnect = [iODBC][Driver Manager]dlopen(/usr/local/lib/libmyodbc5.so, 6): no suitable image found.  Did find:
	/usr/local/lib/libmyodbc5.so: mach-o, but wrong architecture (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
[12 Jan 2010 11:07] Geert Vanderkelen
Driver works on MacOSX 10.6 (tested with OpenOffice..).
Just lacking test case and application to check original bug report.

(very old MySQL server used as well)
[12 Jan 2010 14:42] Paul Konigsberg
Thank you for testing this. When you run your test case, try a query with at least one inner join. (Basic querries seemed to work but I think anything with a join or union seemed to be failing.)
-Paul
[24 Feb 2010 14:08] Tonci Grgin
Sveta, Geert?
[1 Mar 2010 10:40] Geert Vanderkelen
Sorry for this later reply.
I just did some 'complex' queries using an inner join, and that works in OpenOffice. I did however upgrade since then to OpenOffice 3.2..

I'm not happy with the results when doing queries, but it doesn't crash for me.