Dear All, I am using mysql C API for my multi-thread program development (using C++ to develop, Using Redhat 7.2 with 2.4.18-3 kernel version, MySQL-devel-4.0.18-0). In some threads, I will open a new mysql database connection to get the data. While sometime I have the problem in mysql_real_connect() function. It hangs in the __libc_read() function inside mysql_real_connect(). Here is the gdb bt result when the problem occur:
#0 0x40217544 in __libc_read () from /lib/i686/libc.so.6 #1 0x400b25f8 in __DTOR_END__ () at eval.c:41 #2 0x400516da in vio_read () at OutQueue.cc:272 #3 0x40052210 in my_real_read () at OutQueue.cc:272 #4 0x400523c2 in my_net_read () at OutQueue.cc:272 #5 0x4003d64a in net_safe_read () at OutQueue.cc:272 #6 0x4003f614 in mysql_real_connect () at OutQueue.cc:272 #7 0x400355f8 in CBase::ConnectDB (this=0x826ce38) at Base.cc:81 Here is the code of ConnectDB: int CBase::ConnectDB() { if (isConnected) return 0; if ( mysql_init(&connection) == NULL) { return -1; } if( mysql_real_connect(&connection,MYSQL_HOST,MYSQL_USER,MYSQL_PASSWORD,MYSQ L_DBNAME,0,NULL,0) == NULL ) { return -2; } else { isConnected = true; } return 0; } Actually this problem (__libc_read() hangs) occurs not only in this part of code, but also occur when I execute some query using mysql_query(). I have searched around the web and the mailing list but can't find anyone that has this problem. Can anyone help? Thank you Regards, Lung -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]