1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-11 05:52:26 +03:00

BUG#21096: locking issue ; temporary table conflicts.

The problem was that during DROP TEMPORARY TABLE we tried to acquire
the name lock, though temporary tables belongs to one connection, and
no race is possible.

The solution is to not use table name locking while executing
DROP TEMPORARY TABLE.


mysql-test/r/temp_table.result:
  Add result for bug#21096: locking issue ; temporary table conflicts.
mysql-test/t/temp_table.test:
  Add test case for bug#21096: locking issue ; temporary table conflicts.
sql/sql_table.cc:
  Do not use table name locking while executing DROP TEMPORARY TABLE.
This commit is contained in:
unknown
2006-08-29 16:59:20 +04:00
parent 04d60b3897
commit 4ed1ce6f58
3 changed files with 67 additions and 3 deletions

View File

@@ -214,7 +214,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
bool some_tables_deleted=0, tmp_table_deleted=0, foreign_key_error=0;
DBUG_ENTER("mysql_rm_table_part2");
if (lock_table_names(thd, tables))
if (!drop_temporary && lock_table_names(thd, tables))
DBUG_RETURN(1);
for (table=tables ; table ; table=table->next)
@@ -311,7 +311,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
}
}
unlock_table_names(thd, tables);
if (!drop_temporary)
unlock_table_names(thd, tables);
DBUG_RETURN(error);
}