Bug #41911 | mysql_options doesn't work | ||
---|---|---|---|
Submitted: | 7 Jan 2009 3:22 | Modified: | 11 Jan 2009 15:00 |
Reporter: | xiao ke | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 5.0 | OS: | Windows (sp2) |
Assigned to: | CPU Architecture: | Any |
[7 Jan 2009 3:22]
xiao ke
[7 Jan 2009 16:52]
MySQL Verification Team
Thank you for the bug report. Could you please use the mysql_option with MYSQL_READ_DEFAULT_FILE and then in the configuration file setup the value of interactive-timeout to the same value of wait_timeout. Thanks in advance.
[8 Jan 2009 8:05]
xiao ke
thanks for your apply, but I think you may misunderstand my means, in your suggestion, I think the method you give me is to slove the problem "client disconnect from the server for a longtime which default value is 28800 seconds" My problem is how to set the time used to judge the return-time for the "mysql_real_connect", that is to say, what is the value of time for "mysql_real_connect" return ? I think the value is 20 second, I want to know is there a method to change the value? for example,OS-Microsoft Windows (sp2) in the if the server is down, I ues a client to connect the server, must I wait for 20 seconds? can you provide a methond to set this value? MYSQL* m_conn = NULL; mysql_init(m_conn); unsigned int wait_timeout = 3; mysql_options(m_conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&wait_timeout); mysql_real_connect(m_conn,host,"root","root","csfnode",3306,NULL,CLIENT_MULTI_STATEMENTS); I want to set the connect-timeout in the windows, in the OS-unix; the flowing code mysql_options(m_conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char*)&wait_timeout); works well, but in the windows, it doesn't work at all. I want to find a method to slove this problem Looking froward to your apply thanks.
[11 Jan 2009 15:00]
Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Duplicate of bug #36225