1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge mysql.com:/home/mydev/mysql-5.0-tmp_merge

into  mysql.com:/home/mydev/mysql-5.1-amerge
This commit is contained in:
ingo@mysql.com
2006-07-04 10:02:11 +02:00
10 changed files with 238 additions and 91 deletions

View File

@ -1104,7 +1104,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
if (found_old_table)
{
/* Tell threads waiting for refresh that something has happened */
VOID(pthread_cond_broadcast(&COND_refresh));
broadcast_refresh();
}
if (!lock_in_use)
VOID(pthread_mutex_unlock(&LOCK_open));
@ -1674,7 +1674,7 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find)
}
*prev=0;
// Notify any 'refresh' threads
pthread_cond_broadcast(&COND_refresh);
broadcast_refresh();
return start;
}
@ -2224,7 +2224,7 @@ static bool reopen_table(TABLE *table)
if (table->triggers)
table->triggers->set_table(table);
VOID(pthread_cond_broadcast(&COND_refresh));
broadcast_refresh();
error=0;
end:
@ -2325,7 +2325,7 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh)
{
my_afree((gptr) tables);
}
VOID(pthread_cond_broadcast(&COND_refresh)); // Signal to refresh
broadcast_refresh();
*prev=0;
DBUG_RETURN(error);
}
@ -2361,7 +2361,7 @@ void close_old_data_files(THD *thd, TABLE *table, bool abort_locks,
}
}
if (found)
VOID(pthread_cond_broadcast(&COND_refresh)); // Signal to refresh
broadcast_refresh();
DBUG_VOID_RETURN;
}
@ -2514,6 +2514,8 @@ TABLE *drop_locked_tables(THD *thd,const char *db, const char *table_name)
}
}
*prev=0;
if (found)
broadcast_refresh();
if (thd->locked_tables && thd->locked_tables->table_count == 0)
{
my_free((gptr) thd->locked_tables,MYF(0));
@ -6194,7 +6196,7 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
Signal any thread waiting for tables to be freed to
reopen their tables
*/
(void) pthread_cond_broadcast(&COND_refresh);
broadcast_refresh();
DBUG_PRINT("info", ("Waiting for refresh signal"));
if (!(flags & RTFC_CHECK_KILLED_FLAG) || !thd->killed)
{