diff options
author | unknown <bell@sanja.is.com.ua> | 2002-04-29 00:33:52 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-04-29 00:33:52 +0300 |
commit | 3c0e609165197d03d067fed2157673ae42652f26 (patch) | |
tree | f74bb7c0172682417236403294a4f2b39e49af7f /sql/sql_delete.cc | |
parent | a2ce6c71b836c627e71fe37f0aa312b11e59f571 (diff) | |
download | mariadb-git-3c0e609165197d03d067fed2157673ae42652f26.tar.gz |
invalidation moved before tables unlocking
sql/sql_delete.cc:
invalidation moved before tables unlocking
invalidation on multidelete error (if something changed)
sql/sql_parse.cc:
invalidation moved to mysql_admin_table
layout fixing
sql/sql_table.cc:
invalidation moved to mysql_admin_table
sql/sql_update.cc:
invalidation moved before tables unlocking
invalidation on multiupdate error (if something changed)
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index f5a5a684fc0..986e7599df6 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -176,13 +176,13 @@ 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); @@ -355,6 +355,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; |