summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2002-04-29 00:33:52 +0300
committerbell@sanja.is.com.ua <>2002-04-29 00:33:52 +0300
commit29201cbf665bd7007495e06c7240feb5a13b6c71 (patch)
treef74bb7c0172682417236403294a4f2b39e49af7f /sql/sql_update.cc
parenteaa66555c957b5ca61e2eb1103d4b982c67d8817 (diff)
downloadmariadb-git-29201cbf665bd7007495e06c7240feb5a13b6c71.tar.gz
invalidation moved before tables unlocking
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index db520af61c1..eb81f315719 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -318,13 +318,13 @@ int mysql_update(THD *thd,
}
if (using_transactions && ha_autocommit_or_rollback(thd, error >= 0))
error=1;
+ if (updated)
+ query_cache_invalidate3(thd, table_list, 1);
if (thd->lock)
{
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (updated)
- query_cache_invalidate3(thd, table_list, 1);
delete select;
if (error >= 0)
@@ -642,6 +642,10 @@ void multi_update::send_error(uint errcode,const char *err)
/* If nothing updated return */
if (!updated)
return;
+
+ /* Somthing alredy updated consequently we have to invalidate cache */
+ query_cache_invalidate3(thd, update_tables, 1);
+
/* Below can happen when thread is killed early ... */
if (!table_being_updated)
table_being_updated=update_tables;