From ed99de7dcc812fb39859815215c44d1be87c0c03 Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Fri, 22 Nov 2002 00:33:15 +0200 Subject: fixed invalidation of query cache excluded double call of 'invalidate()' --- sql/sql_insert.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sql/sql_insert.cc') 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 &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); } -- cgit v1.2.1