Bug #49472 bug of mysqlclient on X64 under linux
Submitted: 5 Dec 2009 8:42 Modified: 8 Dec 2009 2:52
Reporter: jerry tom Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S2 (Serious)
Version: OS:Linux
Assigned to: CPU Architecture:Any

[5 Dec 2009 8:42] jerry tom
Description:
Hey men! 
    I found a bug of mysqlclient. When I successfully connect to  a database, under 32-bit Linux OS, I can get the database name via the MYSQL struct via accessing the db field of the MYSQL. However,under 64_bit Linux, the db field is NULL.
    Although my program  dosen't crash, but it makes a mistake when running under 64_bit Linux. 

How to repeat:
MYSQL * conn = NULL;
if(mysql_real_connect(conn,dsn,username,password, db_name, db_port,NULL, 0))
{
     if(conn != NULL)
        printf("the database name length is %d \n",strlen(conn->db));
}

under 32_bit Linux the result is right, but under 64_bit ,the output is the database name length is 0.
[5 Dec 2009 9:23] Valeriy Kravchuk
Thank you for the problem report. What exact version(s) of server and client libraries do you use in 32-bit and 64-bit cases?
[8 Dec 2009 2:52] jerry tom
I find I have made a stupid mistake: the version of include files  is not that of the libmysqlclient.so. I am really sorry!