MyODBC 3.51.12 : completely unusable on Linux 64 bits (crashes, strange behavior)

"Jean-Noël Rivasseau" <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <[email protected]>
Hello,

I am running Gentoo 64 bits, gcc 4.1.1, MySQL 5.0.27, unixODBC 2.2.11, and
MyODBC 3.51.12. All of these were compiled for 64 bits, using Gentoo package
manager (Portage).

MySQL (the database) works perfectly well, I am using it heavily with the
PHP driver.

However I cannot get my ODBC C++ program to work correctly.

I would like to know if it is already known that 3.51.12 is completely
unstable under linux 64, or is it just my setup?

I wanted to send a small program that exhibits the problems I am
encountering, however it was too big (46k) for the mailing list. I'd like to
send it to anyone interested though, so please contact me.
Symptoms are crashes and strange ODBC behavior. I strongly suspect that
memory corruption is going on and trashing everything.

To compile and run the program:

To compile *you will need to have Qt 4* or later installed on your box. In
the top directory, type qmake then make. You can then go to the directory
"target/" and run the program. Create a database named "Naiade", then import
the import.sql file to create the SQL tables.

If you run it without modifying the source, currently it will return strange
results but not crash (it will report an invalid handle, when the code
should be perfectly clean). It will log the behavior to a file named
"log_file" in the directory you run the program.

If you want it to crash, just uncomment the line:

    //QString statement = "SELECT id FROM class_100011_structure";

in the first few lines of the file
src/MemberFunctionSpecification_odbc_serialization.cc
and recompile.

This variable (statement) does not do anything and is not even used, but
just creating it makes the code crash. So I strongly suspect memory
corruption is happening.

Note: I also tried to use iODBC and the exact same things happen, so I feel
the culprit can only be MySQL ODBC driver...

I'd like to know if there is a stable version of MySQL ODBC for Linux 64, or
if I have to wait for the 5.0 version.

Jean-Noël Rivasseau
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.