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

Added some missing mutex_locks() when manipulating the table cache.

This should fix some possible table cache corruptions when doing
OPTIMIZE or REPAIR table when other threads are opening new tables.
This commit is contained in:
monty@narttu.mysql.fi
2002-08-05 18:50:38 +03:00
parent 6899a4e30b
commit c0a6890292
5 changed files with 43 additions and 7 deletions

View File

@ -1419,6 +1419,11 @@ bool select_create::send_eof()
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
VOID(pthread_mutex_lock(&LOCK_open));
mysql_unlock_tables(thd, lock);
/*
TODO:
Check if we can remove the following two rows.
We should be able to just keep the table in the table cache.
*/
if (!table->tmp_table)
hash_delete(&open_cache,(byte*) table);
lock=0; table=0;