mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge mysql.com:/usr/home/ram/work/bug21587/my50-bug21587
into mysql.com:/usr/home/ram/work/bug21587/my51-bug21587 sql/mysql_priv.h: Auto merged sql/sql_handler.cc: Auto merged sql/sql_base.cc: merging
This commit is contained in:
@ -756,3 +756,41 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags)
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Mark tables for reopen.
|
||||
|
||||
SYNOPSIS
|
||||
mysql_ha_mark_tables_for_reopen()
|
||||
thd Thread identifier.
|
||||
table Table list to mark for reopen.
|
||||
|
||||
DESCRIPTION
|
||||
For each table found in the handler hash mark it as closed
|
||||
(ready for reopen) and end all index/table scans.
|
||||
|
||||
NOTE
|
||||
The caller must lock LOCK_open.
|
||||
*/
|
||||
|
||||
void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table)
|
||||
{
|
||||
DBUG_ENTER("mysql_ha_mark_tables_for_reopen");
|
||||
|
||||
safe_mutex_assert_owner(&LOCK_open);
|
||||
for (; table; table= table->next)
|
||||
{
|
||||
TABLE_LIST *hash_tables;
|
||||
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
|
||||
(byte*) table->alias,
|
||||
strlen(table->alias) + 1)))
|
||||
{
|
||||
/* Mark table as ready for reopen. */
|
||||
hash_tables->table= NULL;
|
||||
/* End open index/table scans. */
|
||||
table->file->ha_index_or_rnd_end();
|
||||
}
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user