summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-12-02 14:34:01 +0200
committermonty@hundin.mysql.fi <>2001-12-02 14:34:01 +0200
commit1d26537da53fee228b2f9d974d4806a06b76e33e (patch)
tree8e30a64d5c7aaa0ba8554c4c316cc9b76a6724ca /sql/sql_table.cc
parent8a8617075a9e6ae3537bb8d81c8f4ab62e77fa44 (diff)
downloadmariadb-git-1d26537da53fee228b2f9d974d4806a06b76e33e.tar.gz
Query cache.
Remove some warnings
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 049fb1c182c..ae450680fbb 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -158,13 +158,17 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
wrong_tables.append(String(table->real_name));
}
}
- if (some_tables_deleted && !dont_log_query)
+ if (some_tables_deleted)
{
- mysql_update_log.write(thd, thd->query,thd->query_length);
- if (mysql_bin_log.is_open())
+ query_cache.invalidate(tables);
+ if (!dont_log_query)
{
- Query_log_event qinfo(thd, thd->query);
- mysql_bin_log.write(&qinfo);
+ mysql_update_log.write(thd, thd->query,thd->query_length);
+ if (mysql_bin_log.is_open())
+ {
+ Query_log_event qinfo(thd, thd->query);
+ mysql_bin_log.write(&qinfo);
+ }
}
}
@@ -1708,6 +1712,8 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
VOID(pthread_cond_broadcast(&COND_refresh));
VOID(pthread_mutex_unlock(&LOCK_open));
+ table_list->table=0; // Table is closed
+ query_cache.invalidate(table_list);
end_temporary:
sprintf(tmp_name,ER(ER_INSERT_INFO),(ulong) (copied+deleted),