Commit 7a4d2a59 authored by marko's avatar marko

branches/zip: Merge r2617:r2630 from 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
parent 39147158
......@@ -2708,6 +2708,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment