diff options
| author | monty@hundin.mysql.fi <> | 2001-12-02 14:34:01 +0200 |
|---|---|---|
| committer | monty@hundin.mysql.fi <> | 2001-12-02 14:34:01 +0200 |
| commit | 1d26537da53fee228b2f9d974d4806a06b76e33e (patch) | |
| tree | 8e30a64d5c7aaa0ba8554c4c316cc9b76a6724ca /sql/sql_delete.cc | |
| parent | 8a8617075a9e6ae3537bb8d81c8f4ab62e77fa44 (diff) | |
| download | mariadb-git-1d26537da53fee228b2f9d974d4806a06b76e33e.tar.gz | |
Query cache.
Remove some warnings
Diffstat (limited to 'sql/sql_delete.cc')
| -rw-r--r-- | sql/sql_delete.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 63e003178c2..bb04712aaee 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -183,6 +183,8 @@ cleanup: mysql_unlock_tables(thd, thd->lock); thd->lock=0; } + if (deleted) + query_cache.invalidate(table_list); delete select; if (error >= 0) // Fatal error send_error(&thd->net,thd->killed ? ER_SERVER_SHUTDOWN: 0); @@ -539,6 +541,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) close_temporary(table,0); *fn_ext(path)=0; // Remove the .frm extension ha_create_table(path, &create_info,1); + // We don't need to call invalidate() because this table is not in cache if ((error= (int) !(open_temporary_table(thd, path, table_list->db, table_list->real_name, 1)))) (void) rm_temporary_table(table_type, path); @@ -570,6 +573,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) bzero((char*) &create_info,sizeof(create_info)); *fn_ext(path)=0; // Remove the .frm extension error= ha_create_table(path,&create_info,1) ? -1 : 0; + query_cache.invalidate(table_list); if (!dont_send_ok) { |
