[unixODBC-support] Cannot use unixODBC 2.2.14 with MySQL ODBC connector 5.1

Itachi Uchiha itachi8558 at yahoo.com.vn
Sun May 31 16:57:26 BST 2009


Thank you, Nick! What you said was perfectly correct: It was the lack of the password that caused the 'segmentation fault' error. 

To work around this, I just created another MySQL account and, this time, a log in password for it, and the problem has gone. I can't tell you how happy I was when I saw the word 'connected!' appearing. 

I will not use the beta version of MySQL ODBC Connector, the one Jess Balint has suggested above because of the potential unstabilities we often encounter when using beta versions of software.

Thank so much!

Have a nice day,

Itachi


--- Thứ 4, 27/05/09, Nick Gorham <nick at lurcher.org> đã viết:

Từ: Nick Gorham <nick at lurcher.org>
Chủ đề: Re: [unixODBC-support] Cannot use unixODBC 2.2.14 with MySQL ODBC connector 5.1
Đến: "Support for the unixODBC project" <unixodbc-support at mailman.unixodbc.org>
Ngày: Thứ Tư, 27 tháng 5, 2009, 16:02

Itachi Uchiha wrote:
> So it seems that I am not alone when dealing with this error. In fact I wonder is there anyone successful in using unixODBC 2.2.14 with MySQL ODBC Driver 5.1 yet?
> 
I just took a look at this. The problem is that current versions of unixODBC has fixed a long standing bug in isql, if the user name and password wasn't supplied, isql passed them to the driver as a empty string. This told the driver that there was no user name and password, what isql should have done is pass a NULL for the user name and password, this is the signal to the driver that the user name and password has not been provided, so the driver can choose what to do, either look in the ini file, or refuse to connect, or connect without a user name/password.

It seems that (looking at the MySQL odbc driver code) the code assumes that it will never be passed a NULL, so doesn't check, and proceeds to use the value as a pointer, and so seg faults. The seg fault happens in util/stringutil.c on line 95, and its called from driver/ansi.c in SQLConnect, line 264.

You can see (and check this)

isql -v test
Segmentation fault

isql -v test name pass
[S1000][unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'name'@'database' (using password: YES)
[ISQL]ERROR: Could not SQLConnect

Should be enough for upstream to provide a fix for the driver hopefully.

-- Nick
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support



      Tốc độ nhanh, miễn quảng cáo, lưu trữ vô hạn - Yahoo! Mail mang đến cho bạn tất cả. http://vn.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20090531/b9a9ec7a/attachment.html>


More information about the unixODBC-support mailing list