MySQL Forums
Forum List  »  Connector/ODBC

Problem using Connector/ODBC on Fedora 21
Posted by: Leo Carreon
Date: April 09, 2015 06:28PM

Hi,

For starters, I am using Fedora 21 32-bit and these are the package names and version numbers on this platform:

unixODBC 2.3.2
unixODBC-devel 2.3.2
unixODBC-gui-qt 0.10.x
community-mysql 5.6.23
community-mysql-server 5.6.23
mysql-connector-odbc 5.3.2

This is the contents of my /etc/odbc.ini file:

[odbctest]
Description=MySQL
Driver=MySQL
Server=
Database=odbctest
Port=
Socket=
Option=
Stmt=
Charset=utf8

I have setup my test database using the "MySQL" command line tool. My C++ test program is connecting to a MySQL server using Connector/ODBC. When my test program calls SQLConnect it crashes with the following snippet of a backtrace:

/lib/libc.so.6(+0x6ce09)[0xb72d6e09]
/lib/libc.so.6(+0x74406)[0xb72de406]
/lib/libc.so.6(cfree+0x56)[0xb72e2676]
/usr/lib/mysql/libmysqlclient.so.18(my_free+0x63)[0xb6ef2f43]
/usr/lib/libmyodbc5.so(MySQLGetPrivateProfileStringW+0x179)[0xb7239ca9]
/usr/lib/libmyodbc5.so(ds_lookup+0x78)[0xb72381a8]
/usr/lib/libmyodbc5.so(MySQLConnect+0xde)[0xb72147ce]
/usr/lib/libmyodbc5.so(SQLConnectW+0x52)[0xb7231ec2]
/lib/libodbc.so.2(SQLConnect+0xd10)[0xb75a86a0]

I have exactly the same configuration on Fedora 20 32/64-bit and its happily working on these platforms. The only difference I can see is the package version numbers which are:

unixODBC 2.3.2
unixODBC-devel 2.3.2
unixODBC-gui-qt 0.8.x
community-mysql 5.5.42
community-mysql-server 5.5.42
mysql-connector-odbc 5.2.5

I noticed that in either platform /usr/lib/libmyodbc5.so is a link to /usr/lib/libmyodbc5w.so.

Note that my application is ANSI, i.e. it uses SQLCHAR* when using ODBC calls.

What am I doing wrong on my Fedora 21 platform? What changes do I need to make to get this to work?

Any help will be much appreciated. Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Problem using Connector/ODBC on Fedora 21
April 09, 2015 06:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.