summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorDmitry Shulga <Dmitry.Shulga@oracle.com>2010-11-07 23:42:54 +0600
committerDmitry Shulga <Dmitry.Shulga@oracle.com>2010-11-07 23:42:54 +0600
commit9c45600dac77ea6751e431223e2b25b88a319686 (patch)
treec67c10fa0b06f554af7c9e95b0bb0e15c4e03b8f /sql/sql_rename.cc
parentfb2b0a48bcd381703f9a10025c832817a6ea7630 (diff)
downloadmariadb-git-9c45600dac77ea6751e431223e2b25b88a319686.tar.gz
A fix and a test case for Bug#47924 -main.log_tables times out
sporadically. The cause of the sporadic time out was a leaking protection against the global read lock, taken by the RENAME statement, and not released in case of an error occurred during RENAME. The leaking protection counter would lead to the value of protect_against_global_read never dropping to 0. Consequently FLUSH TABLES in all connections, including the one that leaked the protection, could not proceed. The fix is to ensure that all branchesin RENAME code properly release GRL protection.
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index e85e730db5b..df7054c94d0 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -99,7 +99,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
*/
my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), ren_table->table_name,
ren_table->table_name);
- DBUG_RETURN(1);
+ goto err;
}
}
else
@@ -112,7 +112,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
*/
my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), ren_table->table_name,
ren_table->table_name);
- DBUG_RETURN(1);
+ goto err;
}
else
{
@@ -130,7 +130,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
else
my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), rename_log_table[1],
rename_log_table[1]);
- DBUG_RETURN(1);
+ goto err;
}
}