mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 4.0 to get the latest bug patches to 4.1
This commit is contained in:
@ -300,6 +300,7 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
|
||||
thd->proc_info="Flushing tables";
|
||||
|
||||
close_old_data_files(thd,thd->open_tables,1,1);
|
||||
mysql_ha_close_list(thd, tables);
|
||||
bool found=1;
|
||||
/* Wait until all threads has closed all the tables we had locked */
|
||||
DBUG_PRINT("info",
|
||||
@ -850,6 +851,9 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
/* close handler tables which are marked for flush */
|
||||
mysql_ha_close_list(thd, (TABLE_LIST*) NULL, /*flushed*/ 1);
|
||||
|
||||
for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ;
|
||||
table && table->in_use ;
|
||||
table = (TABLE*) hash_next(&open_cache,(byte*) key,key_length))
|
||||
@ -1220,6 +1224,7 @@ bool wait_for_tables(THD *thd)
|
||||
{
|
||||
thd->some_tables_deleted=0;
|
||||
close_old_data_files(thd,thd->open_tables,0,dropping_tables != 0);
|
||||
mysql_ha_close_list(thd, (TABLE_LIST*) NULL, /*flushed*/ 1);
|
||||
if (!table_is_used(thd->open_tables,1))
|
||||
break;
|
||||
(void) pthread_cond_wait(&COND_refresh,&LOCK_open);
|
||||
|
Reference in New Issue
Block a user