summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authormronstrom@mysql.com <>2005-07-20 21:19:01 +0200
committermronstrom@mysql.com <>2005-07-20 21:19:01 +0200
commit4cb963439aa7bfc1db37715282e8497f75f0cf94 (patch)
tree25081a8481475ce85bd3d6447b6b3ec6a2cc3d91 /sql/sql_table.cc
parent2d23c691f731d4bd52a3d8247edb673613209cac (diff)
downloadmariadb-git-4cb963439aa7bfc1db37715282e8497f75f0cf94.tar.gz
Bug #10600 After review fixes
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index d0ef29cee50..4c269e6830f 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -187,7 +187,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
}
abort_locked_tables(thd,db,table->real_name);
- flags= WAIT_OTHER_THREAD_FLAG | CHECK_KILLED_FLAG;
+ flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
remove_table_from_cache(thd,db,table->real_name,flags);
drop_locked_tables(thd,db,table->real_name);
if (thd->killed)
@@ -976,7 +976,6 @@ mysql_rename_table(enum db_type base,
static void wait_while_table_is_used(THD *thd,TABLE *table,
enum ha_extra_function function)
{
- uint flags;
DBUG_PRINT("enter",("table: %s", table->real_name));
DBUG_ENTER("wait_while_table_is_used");
safe_mutex_assert_owner(&LOCK_open);
@@ -986,9 +985,8 @@ static void wait_while_table_is_used(THD *thd,TABLE *table,
mysql_lock_abort(thd, table); // end threads waiting on lock
/* Wait until all there are no other threads that has this table open */
- flags= WAIT_OTHER_THREAD_FLAG;
remove_table_from_cache(thd,table->table_cache_key,
- table->real_name,flags);
+ table->real_name, RTFC_WAIT_OTHER_THREAD_FLAG);
DBUG_VOID_RETURN;
}
@@ -1305,7 +1303,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
const char *old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
"Waiting to get writelock");
mysql_lock_abort(thd,table->table);
- flags= WAIT_OTHER_THREAD_FLAG | CHECK_KILLED_FLAG;
+ flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
remove_table_from_cache(thd, table->table->table_cache_key,
table->table->real_name, flags);
thd->exit_cond(old_message);
@@ -1372,10 +1370,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
table->table->version=0; // Force close of table
else if (open_for_modify)
{
- uint flags= 0;
pthread_mutex_lock(&LOCK_open);
remove_table_from_cache(thd, table->table->table_cache_key,
- table->table->real_name, flags);
+ table->table->real_name, RTFC_NO_FLAG);
pthread_mutex_unlock(&LOCK_open);
/* May be something modified consequently we have to invalidate cache */
query_cache_invalidate3(thd, table->table, 0);
@@ -2099,9 +2096,9 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
*/
if (table)
{
- uint flags= 0;
VOID(table->file->extra(HA_EXTRA_FORCE_REOPEN)); // Use new file
- remove_table_from_cache(thd,db,table_name,flags);// Mark in-use copies old
+ remove_table_from_cache(thd,db,table_name,RTFC_NO_FLAG);
+ // Mark in-use copies old
mysql_lock_abort(thd,table); // end threads waiting on lock
}
VOID(quick_rm_table(old_db_type,db,old_name));