summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 4316acfa47d..64a55380b69 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1119,8 +1119,12 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (fatal_error)
table->table->version=0; // Force close of table
else if (open_for_modify)
+ {
remove_table_from_cache(thd, table->table->table_cache_key,
table->table->real_name);
+ /* May be something modified consequently we have to invalidate cache */
+ query_cache_invalidate3(thd, table->table, 0);
+ }
close_thread_tables(thd);
table->table=0; // For query cache
if (my_net_write(&thd->net, (char*) packet->ptr(),