1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2002-11-22 00:33:15 +02:00
parent 910849ccd1
commit 03ac294cce
6 changed files with 30 additions and 20 deletions

View File

@ -318,14 +318,12 @@ int mysql_update(THD *thd,
if (ha_autocommit_or_rollback(thd, error >= 0))
error=1;
}
/*
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 (updated &&
(!transactional_table ||
thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
if (updated)
{
query_cache_invalidate3(thd, table_list, 1);
}