Bug #30900 SQLGetData() returns no row content
Submitted: 7 Sep 2007 15:13 Modified: 13 Nov 2007 17:28
Reporter: Susanne Ebrecht Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version: OS:FreeBSD
Assigned to: CPU Architecture:Any

[7 Sep 2007 15:13] Susanne Ebrecht
Description:
Hi,

System: FreeBSD 7.0 amd64
MySQL: 5.1.20-beta
MyODBC 3.51.19
libiodbc: 3.52.5

All worked fine with MySQL 5.1.19-beta.

After upgrading to MySQL 5.1.20-beta, SQLGetData() won't work.

I neither upgrade libiodbc nor MyODBC.

I have this problem with all tests that include SQLGetData().

And I have no idea, if it is a bug in the MySQL Client, the iodbc or the MySQL ODBC.

When I only use iodbctest, the result is like this:

SQL>select * from test.bla;
Statement executed. 5 rows affected.

SQL>show databases;
Statement executed. 6 rows affected.

Also at c-programms and c-tests, I will get the number of rows but it seems, that the content wouldn't be carried forward.

I get no errors.

And insert, create and other statements work fine.

I'll append a truss file and my c-test-programm here.

I made a truss and I think, these are the relevant parts:

....
open("/usr/share/locale/de_DE.UTF-8/LC_NUMERIC",O_RDONLY,05213720646000) = 4 (0x4)
....
connect(4,{ AF_INET 127.0.0.1:3306 },16)         = 0 (0x0)
setsockopt(0x4,0xffff,0x1006,0x7fffffff5710,0x10) ERR#33 'Numerical argument out of domain'
setsockopt(0x4,0xffff,0x1005,0x7fffffff5710,0x10) ERR#33 'Numerical argument out of domain'
....
After this the connect is ok and the create table and inserts will work fine.
...
write(1," SQLRETURN of SQLExecDirect from"...,47) = 47 (0x2f)
open("/usr/share/locale/English/LC_NUMERIC",O_RDONLY,05213720646000) ERR#2 'No such file or directory'
write(1,"result of select: id: 0, random "...,39) = 39 (0x27)
open("/usr/share/locale/English/LC_NUMERIC",O_RDONLY,05213720646000) ERR#2 'No such file or directory'
write(1,"result of select: id: 0, random "...,39) = 39 (0x27)
open("/usr/share/locale/English/LC_NUMERIC",O_RDONLY,05213720646000) ERR#2 'No such file or directory'
write(1,"result of select: id: 0, random "...,39) = 39 (0x27)
open("/usr/share/locale/English/LC_NUMERIC",O_RDONLY,05213720646000) ERR#2 'No such file or directory'
write(1,"result of select: id: 0, random "...,39) = 39 (0x27)
open("/usr/share/locale/English/LC_NUMERIC",O_RDONLY,05213720646000) ERR#2 'No such file or directory'
write(1,"result of select: id: 0, random "...,39) = 39 (0x27)

Here it fails. Of course there is no directory in /usr/share/locale with the name English.

I have no idea, who tries to call this directory and I have no idea, how I can figure out this. Trying to figure out this with gdb failed.

Also all work fine on my FreeBSD 32bit system it's only 64bit. 

How to repeat:
I can repeat it with every test or testcase that includes a SQLGetData().

Suggested fix:
I have no idea ...
[2 Oct 2007 9:57] Susanne Ebrecht
after re-install (compiling) mysql server 5.1.21 again and installing the newer version MyODBC 3.51.21 all work fine again.
I can not say, if the server or the MyODBC occurs this weird behaviour because also the server code was different to the code I compiled the time before.
[13 Nov 2007 17:28] Susanne Ebrecht
This is a duplicate of bug #32294