summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2008-12-14 12:31:26 -0700
committerTimothy Smith <timothy.smith@sun.com>2008-12-14 12:31:26 -0700
commitbb9ee6b684160b32dd0b35cff86fb3cf22687906 (patch)
treec08c59587f5762fe0af2da158519f4d97a1a0eb4 /storage
parentea912a97c7eb3b8b2c879bccca072287deaab6f0 (diff)
downloadmariadb-git-bb9ee6b684160b32dd0b35cff86fb3cf22687906.tar.gz
Apply InnoDB snapshot innodb-5.1-ss2637, part 3. Fixes
Bug #39483: InnoDB hang on adaptive hash because of out of order ::open() call by MySQL Detailed revision comments: r2630 | inaam | 2008-09-16 19:11:26 +0300 (Tue, 16 Sep 2008) | 11 lines branches/5.1 bug#39483 InnoDB hang on adaptive hash because of out of order ::open() call by MySQL Forward port of r2629 Under some conditions MySQL calls ::open with search_latch leading to a deadlock as we try to acquire dict_sys->mutex inside ::open breaking the latching order. The fix is to release search_latch. Reviewed by: Heikki
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 682ba19aab9..1982fe8c212 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -2298,6 +2298,14 @@ ha_innobase::open(
UT_NOT_USED(test_if_locked);
thd = ha_thd();
+
+ /* Under some cases MySQL seems to call this function while
+ holding btr_search_latch. This breaks the latching order as
+ we acquire dict_sys->mutex below and leads to a deadlock. */
+ if (thd != NULL) {
+ innobase_release_temporary_latches(ht, thd);
+ }
+
normalize_table_name(norm_name, name);
user_thd = NULL;