4085 Tor Didriksen 2012-07-30
Bug#14224928 RQG_MDL_STABILITY_VALGRIND FAILING WITH "STATUS_VALGRIND_FAILURE" ON DAILY TRUNK
Avoid multiple calls to vio_delete().
Do vio_delete() while holding LOCK_thd_data.
modified:
sql/mysqld.cc
sql/sql_class.cc
4084 Hemant Kumar 2012-07-30
Non functional change (minor change in collection)-
Increased "--testcase-timeout" for ps-degug-big and ps-big on Weekly trunk.
modified:
mysql-test/collections/default.weekly
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2012-07-25 10:16:31 +0000
+++ b/sql/mysqld.cc 2012-07-30 12:47:14 +0000
@@ -1355,7 +1355,8 @@ static void close_connections(void)
statements and inform their clients that the server is about to die.
*/
- sql_print_information("Giving client threads a chance to die gracefully");
+ sql_print_information("Giving %d client threads a chance to die gracefully",
+ static_cast<int>(get_thread_count()));
mysql_mutex_lock(&LOCK_thread_count);
@@ -1402,7 +1403,8 @@ static void close_connections(void)
client on a blocking read call are aborted.
*/
- sql_print_information("Forcefully disconnecting remaining clients");
+ sql_print_information("Forcefully disconnecting %d remaining clients",
+ static_cast<int>(get_thread_count()));
#ifndef __bsdi__ // Bug in BSDI kernel
DBUG_PRINT("quit", ("Locking LOCK_thread_count"));
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2012-07-26 11:31:22 +0000
+++ b/sql/sql_class.cc 2012-07-30 12:47:14 +0000
@@ -1527,22 +1527,24 @@ void THD::release_resources()
mysql_mutex_assert_not_owner(&LOCK_thread_count);
DBUG_ASSERT(m_release_resources_done == false);
- /* Ensure that no one is using THD */
- mysql_mutex_lock(&LOCK_thd_data);
- mysql_mutex_unlock(&LOCK_thd_data);
-
mysql_mutex_lock(&LOCK_status);
add_to_status(&global_status_var, &status_var);
mysql_mutex_unlock(&LOCK_status);
+ /* Ensure that no one is using THD */
+ mysql_mutex_lock(&LOCK_thd_data);
+
/* Close connection */
#ifndef EMBEDDED_LIBRARY
if (net.vio)
{
vio_delete(net.vio);
net_end(&net);
+ net.vio= NULL;
}
#endif
+ mysql_mutex_unlock(&LOCK_thd_data);
+
stmt_map.reset(); /* close all prepared statements */
if (!cleanup_done)
cleanup();
@@ -1803,8 +1805,11 @@ void THD::disconnect()
#endif
/* Disconnect even if a active vio is not associated. */
- if (net.vio != vio)
+ if (net.vio != vio && net.vio != NULL)
+ {
vio_close(net.vio);
+ net.vio= NULL;
+ }
mysql_mutex_unlock(&LOCK_thd_data);
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.6 branch (tor.didriksen:4084 to 4085) Bug#14224928 | Tor Didriksen | 30 Jul |