summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-05-09 17:30:58 +0300
committerunknown <bell@sanja.is.com.ua>2002-05-09 17:30:58 +0300
commitd946f9573813d4b1a10702ae58a6a26d5193c06b (patch)
tree48c1ad6c63fca0e64b3b81f954908d4b19725347 /sql/sql_delete.cc
parente39cd8c4d230f0118c984e53f43f8adabe5688ac (diff)
parentec06b2f7445c1757e7fe81ad16e473c162b2c38a (diff)
downloadmariadb-git-d946f9573813d4b1a10702ae58a6a26d5193c06b.tar.gz
merge
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 9d1037a9dc7..c8ed74c9bca 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -176,15 +176,15 @@ cleanup:
}
if (using_transactions && ha_autocommit_or_rollback(thd,error >= 0))
error=1;
+ if (deleted)
+ {
+ query_cache_invalidate3(thd, table_list, 1);
+ }
if (thd->lock)
{
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (deleted)
- {
- query_cache_invalidate3(thd, table_list, 1);
- }
delete select;
if (error >= 0) // Fatal error
send_error(&thd->net,thd->killed ? ER_SERVER_SHUTDOWN: 0);
@@ -357,6 +357,9 @@ void multi_delete::send_error(uint errcode,const char *err)
if (!deleted)
DBUG_VOID_RETURN;
+ /* Somthing alredy deleted consequently we have to invalidate cache */
+ query_cache_invalidate3(thd, delete_tables, 1);
+
/* Below can happen when thread is killed early ... */
if (!table_being_deleted)
table_being_deleted=delete_tables;