Bug #32149 Long semaphore wait for adaptive hash latch
Fix by calling ha_release_temporary_latches() before ::filesort(). sql/filesort.cc: Call ha_release_temporary_latches() before performing a (possibly long) ::filesort().
This commit is contained in:
parent
359b2cedb4
commit
a3f80f54b4
@ -112,6 +112,13 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
|||||||
FILESORT_INFO table_sort;
|
FILESORT_INFO table_sort;
|
||||||
TABLE_LIST *tab= table->pos_in_table_list;
|
TABLE_LIST *tab= table->pos_in_table_list;
|
||||||
Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
|
Item_subselect *subselect= tab ? tab->containing_subselect() : 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Release InnoDB's adaptive hash index latch (if holding) before
|
||||||
|
running a sort.
|
||||||
|
*/
|
||||||
|
ha_release_temporary_latches(thd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Don't use table->sort in filesort as it is also used by
|
Don't use table->sort in filesort as it is also used by
|
||||||
QUICK_INDEX_MERGE_SELECT. Work with a copy and put it back at the end
|
QUICK_INDEX_MERGE_SELECT. Work with a copy and put it back at the end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user