1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#32149: Long semaphore wait for adaptive hash latch

Holding on to the temporary inno hash index latch is an optimization in
many cases, but a pessimization in some others.

Release temporary latches for those corner cases we (or rather, or customers,
thanks!) have identified, that is, when we are about to do something that
might take a really long time, like REPAIR or filesort.
This commit is contained in:
Tatiana A. Nurnberg
2009-06-05 00:23:08 +02:00
parent 1a1ffe7312
commit b89d2fce58
3 changed files with 13 additions and 0 deletions

View File

@ -10226,6 +10226,9 @@ free_tmp_table(THD *thd, TABLE *entry)
save_proc_info=thd->proc_info;
thd_proc_info(thd, "removing tmp table");
// Release latches since this can take a long time
ha_release_temporary_latches(thd);
if (entry->file)
{
if (entry->db_stat)
@ -10274,6 +10277,10 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
table->file->print_error(error,MYF(0));
DBUG_RETURN(1);
}
// Release latches since this can take a long time
ha_release_temporary_latches(thd);
new_table= *table;
new_table.s= &new_table.share_not_to_be_used;
new_table.s->db_type= DB_TYPE_MYISAM;