diff options
author | unknown <kevin.lewis@oracle.com> | 2013-02-27 12:44:58 -0600 |
---|---|---|
committer | unknown <kevin.lewis@oracle.com> | 2013-02-27 12:44:58 -0600 |
commit | e1e43631f86828b90e4f80eb1b76501676ff565f (patch) | |
tree | ce7f65b2d3bbf6b19160920e051ff288d35bbd94 /storage/innobase/row | |
parent | a0d7f34ba67308cd9ad9bcb2f4424687c4c35621 (diff) | |
download | mariadb-git-e1e43631f86828b90e4f80eb1b76501676ff565f.tar.gz |
Bug #16305265 HANG IN RENAME TABLE
This is a deadlock that will also be fixed in the server by
Bug #11844915 - HANG IN THDVAR MUTEX ACQUISITION.
So this is a simple alternate method of fixing the same problem,
but from within InnoDB.
The simple change is to make rename table start a transaction
before locking dict_sys->mutex since thd_supports_xa() can call
THDVAR which can lock a mutex, LOCK_global_system_variables, that
is used in the server by many other activities. At least one of
those, sys_var::update(), can call back into InnoDB and try to
lock dict_sys->mutex while holding LOCK_global_system_variables.
The other bug fix for 11844915 eliminates the use of
LOCK_global_system_variables for calls to THDVAR.
Approved by marko in http://rb.no.oracle.com/rb/r/2000/
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0mysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 73da6215f0d..77fa6518b35 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -3840,6 +3840,7 @@ row_rename_table_for_mysql( ut_a(old_name != NULL); ut_a(new_name != NULL); + ut_ad(trx->conc_state == TRX_ACTIVE); if (srv_created_new_raw || srv_force_recovery) { fputs("InnoDB: A new raw disk partition was initialized or\n" @@ -3864,7 +3865,6 @@ row_rename_table_for_mysql( } trx->op_info = "renaming table"; - trx_start_if_not_started(trx); old_is_tmp = row_is_mysql_tmp_table_name(old_name); new_is_tmp = row_is_mysql_tmp_table_name(new_name); |