diff options
author | unknown <bell@sanja.is.com.ua> | 2002-06-05 21:32:22 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-06-05 21:32:22 +0300 |
commit | 954a0583f8408927184f12ef67527037e10b36d2 (patch) | |
tree | 945cc821cedde0c371ca804a2556598b1d087da7 /sql/sql_update.cc | |
parent | a532bfb2ea0a0d1cfc0c8d25e6a18cf5a8c0c5bc (diff) | |
parent | fa86b948379ca3929ebd8a7b941d6c2fbb26f8ec (diff) | |
download | mariadb-git-954a0583f8408927184f12ef67527037e10b36d2.tar.gz |
merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 1bb0537a731..51453f955e8 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -318,13 +318,15 @@ 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) @@ -649,6 +651,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; @@ -795,8 +801,9 @@ bool multi_update::send_eof() sprintf(buff,ER(ER_UPDATE_INFO), (long) found, (long) updated, (long) thd->cuted_fields); if (updated) + { query_cache_invalidate3(thd, update_tables, 1); - + } ::send_ok(&thd->net, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated, thd->insert_id_used ? thd->insert_id() : 0L,buff); |