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

Flush entries from the query cache for tables used in

administrative statements that may alter the table, such
as REPAIR TABLE. (Bug #8480)


mysql-test/r/query_cache.result:
  Add new results
mysql-test/t/query_cache.test:
  Add regression test
sql/sql_table.cc:
  Make sure entries are flushed from the query cache for
  any administrative command run on a table that acquires
  a write lock on it (and thus might change it), like 
  REPAIR TABLE.
This commit is contained in:
unknown
2005-03-07 18:15:19 -08:00
parent a93b0b59bd
commit 8e24e6079f
3 changed files with 35 additions and 1 deletions

View File

@ -1318,7 +1318,9 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
thd->exit_cond(old_message);
if (thd->killed)
goto err;
open_for_modify=0;
/* Flush entries in the query cache involving this table. */
query_cache_invalidate3(thd, table->table, 0);
open_for_modify= 0;
}
int result_code = (table->table->file->*operator_func)(thd, check_opt);