mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into moksha.com.br:/Users/davi/mysql/bugs/31409-5.1
This commit is contained in:
@ -2466,7 +2466,13 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
/* close handler tables which are marked for flush */
|
||||
/*
|
||||
In order for the back off and re-start process to work properly,
|
||||
handler tables having old versions (due to FLUSH TABLES or pending
|
||||
name-lock) MUST be closed. This is specially important if a name-lock
|
||||
is pending for any table of the handler_tables list, otherwise a
|
||||
deadlock may occur.
|
||||
*/
|
||||
if (thd->handler_tables)
|
||||
mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE);
|
||||
|
||||
@ -2533,6 +2539,10 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
table->db_stat == 0 signals wait_for_locked_table_names
|
||||
that the tables in question are not used any more. See
|
||||
table_is_used call for details.
|
||||
|
||||
Notice that HANDLER tables were already taken care of by
|
||||
the earlier call to mysql_ha_flush() in this same critical
|
||||
section.
|
||||
*/
|
||||
close_old_data_files(thd,thd->open_tables,0,0);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user