Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
resolving myodbc crash

resolving myodbc crash

2006-04-01       - By sunil arora

 Back
Hi folks,
This is my first post to this list.

We are trying to port mysql-connector-odbc on SFU environment. SFU is
a unix like environment which is installed as POSIX subsystem on
windows. This subsystem is called Interix. It has GNU's build system.

I was able to build both libmysqlclient_r.a and libmyodbc3.a ( the
static libraries only).
I have compiled libmysqlclient_r.a from mysql-4 (See http://sql-4.ora-code.com).1.15 (package) and
myodbc drivers are from the latest stable source 3.51.12.
Following is the configure command I have used for configuring the
mysql-4 (See http://sql-4.ora-code.com).1.15 for building the libraries.
./configure --prefix=/usr/local/mysql --without-server --with-pic
--with-pthread --enable-thread-safe-client
We are using gnu gcc3.3 for building this library but somehow
configure script says this  "ld" doesn't shared library.

Following the configure command I used for building the mysql-connector source
./configure --prefix=/usr/local/myodbc
--with-unixODBC=/usr/local/unixODBC
--with-unixODBC-includes=/usr/local/unixODBC/include
--with-unixODBC-libs=/usr/local/unixODBC/lib
--with-mysql-path=/usr/local/mysql/ --with-gnu-ld=yes
--enable-thread-safe  --enable-shared --enable-gui=no
--with-samples=no --enable-test=no

Since its not able to build shared library with this compiler set, I
made shared libraries manually with this command.

gcc -shared  -o .libs/libmyodbc3_r.so *.o ../util/*.o
-L/usr/local/mysql/lib/mysql/ -L/usr/local/unixODBC/lib/ -lodbcinst
?lmysqlclient_r -lz -lc -lpthread

I used to unixODBC's isql utility to check the connectivity with a
test dsn ( we are using mysql-4 (See http://sql-4.ora-code.com).1 server) and myodbc's driver's got
invoked and SQLConnect got initiated but very soon it got core dump
with "illegal instruction".

Here are some of the details:

bash-3 (See http://ash-3.ora-code.com).00$ ./isql -v test
Illegal instruction (core dumped)

When I run it through gdb, it list following trace.
Program received signal SIGILL, Illegal instruction.

0x00857da0 in cs_value () at /tmp/cczLMK6t.s:12
12      /tmp/cczLMK6t.s: No such file or directory.
       in /tmp/cczLMK6t.s
Current language:  auto; currently asm
(gdb) bt
#0  0x00857da0 in cs_value () at /tmp/cczLMK6t.s:12
#1  0x0085c988 in my_xml_parse () at /tmp/cczLMK6t.s:12
#2  0x00857909 in my_parse_charset_xml () at /tmp/cczLMK6t.s:12
#3  0x0084ec49 in init_available_charsets () at /tmp/cczLMK6t.s:12
#4  0x0084e4a1 in get_charset_by_csname () at /tmp/cczLMK6t.s:12
#5  0x0084a6e8 in mysql_real_connect () at /tmp/cczLMK6t.s:12
#6  0x00834ce7 in SQLConnect () at /tmp/cczLMK6t.s:12
#7  0x1000c03e in SQLConnect (connection_handle=0x1474e0,
server_name=0x81fe18 "test", name_length1?, user_name=0x81fce8 "",
   name_length2?, authentication=0x81fbb8 "", name_length3?) at
SQLConnect.c:3721
#8  0x00401ce2 in OpenDatabase (phEnv=0x409058, phDbc=0x40905c,
szDSN=0x81fe18 "test", szUID=0x81fce8 "", szPWD=0x81fbb8 "") at
isql.c:262
#9  0x004018a2 in main (argc=3, argv=0x1077c) at isql.c:128

Though, gdb's output is not correct because compiler optimization has
already confused gdb.

Any Idea wht could be going wrong here ?

-sunil

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:    http://lists.mysql.com/myodbc?unsub=mysql@(protected)