summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-11-22 00:33:15 +0200
committerunknown <bell@sanja.is.com.ua>2002-11-22 00:33:15 +0200
commit03ac294cceb5619557fffacbf95901f4c5b1997f (patch)
treeb435c42cf5ff11d8d099465a4944b83164c4bdee /sql/sql_insert.cc
parent910849ccd1f5f24e90de0f48091a4c6981c71126 (diff)
downloadmariadb-git-03ac294cceb5619557fffacbf95901f4c5b1997f.tar.gz
fixed invalidation of query cache
excluded double call of 'invalidate()' mysql-test/r/innodb_cache.result: test of invalidation mysql-test/t/innodb_cache.test: test of invalidation sql/handler.cc: excluded double call of 'invalidate()' sql/sql_delete.cc: fixed invalidation of query cache sql/sql_insert.cc: fixed invalidation of query cache sql/sql_update.cc: fixed invalidation of query cache
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 2508314c469..6ce2b50fc36 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -319,13 +319,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
error=ha_autocommit_or_rollback(thd,error);
/*
- Only invalidate the query cache if something changed or if we
- didn't commit the transacion (query cache is automaticly
- invalidated on commit)
+ Store table for future invalidation or invalidate it in
+ the query cache if something changed
*/
- if ((info.copied || info.deleted) &&
- (!transactional_table ||
- thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
+ if (info.copied || info.deleted)
{
query_cache_invalidate3(thd, table_list, 1);
}