Bug #35937 | MySQL 5.0.45: Connection timeout, Reconnect option | ||
---|---|---|---|
Submitted: | 9 Apr 2008 14:04 | Modified: | 16 May 2008 9:01 |
Reporter: | Yan Nagler | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S1 (Critical) |
Version: | 5.0.45 | OS: | Linux (PowerPC) |
Assigned to: | CPU Architecture: | Any | |
Tags: | 5.0.45, MySQL, reconnect, timeout, Unknown prepared statement handler (1) given to mysql_stmt_execute |
[9 Apr 2008 14:04]
Yan Nagler
[9 Apr 2008 17:15]
MySQL Verification Team
Thank you for the bug report. Are you using prepared statements? If yes then when the reconnect is done that prepared statement handler is unknown. Otherwise could you please provide a complete test case which shows that behavior. Thanks in advance.
[10 Apr 2008 7:16]
Yan Nagler
Miguel, thanks a lot for a quick response! It happens under following circumstances: We hold the structure, containing both the connection itself and all the handles of the prepared statements, so we allocate each statement only once. You can see this structure below. We do not use the DB intensively, so if there is a long period withou accessing the server, we get this timeout problem. Attached the connection structure, mentioned above: typedef struct _db_conn_t { MYSQL* p_conn; // CM // Table: 'Params' MYSQL_STMT* p_stmt_add_param; MYSQL_STMT* p_stmt_get_param; MYSQL_STMT* p_stmt_foreach_param; MYSQL_STMT* p_stmt_set_param_val; MYSQL_STMT* p_stmt_get_param_val; // EM // Table: 'Events' MYSQL_STMT* p_stmt_add_event; MYSQL_STMT* p_stmt_remove_event; MYSQL_STMT* p_stmt_remove_events; // All MYSQL_STMT* p_stmt_get_events; // All MYSQL_STMT* p_stmt_count_events; MYSQL_STMT* p_stmt_foreach_event; } DB_CONN_T; Waiting for you reply.
[16 Apr 2008 9:01]
Susanne Ebrecht
You will get an overview of our timeout variables by using: mysql> show variables like '%timeout%'; I think, what's necessary for you is wait_timeout. Is it possible that your client will use connection because it idled longer then wait_timeout value?
[16 May 2008 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".