1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge adventure.(none):/home/thek/Development/cpp/bug21074/my51-bug21074

into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
This commit is contained in:
thek@adventure.(none)
2007-07-02 21:03:10 +02:00
10 changed files with 674 additions and 370 deletions

View File

@ -144,10 +144,14 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
}
}
VOID(pthread_mutex_lock(&LOCK_open));
if (lock_table_names(thd, table_list))
pthread_mutex_lock(&LOCK_open);
if (lock_table_names_exclusively(thd, table_list))
{
pthread_mutex_unlock(&LOCK_open);
goto err;
}
pthread_mutex_unlock(&LOCK_open);
error=0;
if ((ren_table=rename_tables(thd,table_list,0)))
{
@ -178,10 +182,14 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
send_ok(thd);
}
if (!error)
query_cache_invalidate3(thd, table_list, 0);
pthread_mutex_lock(&LOCK_open);
unlock_table_names(thd, table_list, (TABLE_LIST*) 0);
pthread_mutex_unlock(&LOCK_open);
err:
pthread_mutex_unlock(&LOCK_open);
/* enable logging back if needed */
if (disable_logs)
{