mariadb/storage
Davi Arnaut 664bb23a30 Bug#41098: Query Cache returns wrong result with concurrent insert
The problem is that select queries executed concurrently with
a concurrent insert on a MyISAM table could be cached if the
select started after the query cache invalidation but before
the unlock of tables performed by the concurrent insert. This
race could happen because the concurrent insert was failing
to prevent cache of select queries happening at the same time.

The solution is to add a 'uncacheable' status flag to signal
that a concurrent insert is being performed on the table and
that queries executing at the same time shouldn't cache the
results.

mysql-test/r/query_cache_debug.result:
  Add test case result for Bug#41098
mysql-test/t/disabled.def:
  Re-enable test case.
mysql-test/t/query_cache_debug.test:
  Add test case for Bug#41098
sql/sql_cache.cc:
  Debug sync point for regression testing purposes.
sql/sql_insert.cc:
  Remove meaningless query cache invalidate. There is already
  a preceding invalidate for queries that started before the
  concurrent insert.
storage/myisam/ha_myisam.cc:
  Check for a active concurrent insert.
storage/myisam/mi_locking.c:
  Signal the start of a concurrent insert. Flag is zeroed once
  the state is updated back.
storage/myisam/myisamdef.h:
  Add flag to signal a active concurrent insert.
2009-02-19 18:09:35 -03:00
..
archive Merge from mysql-5.1.30-release 2008-11-27 00:02:10 +01:00
blackhole Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
csv Bug#41441 repair csv table crashes debug server 2008-12-29 16:50:51 +04:00
example Merge trift2.:/MySQL/M51/mysql-5.1 2008-03-14 14:41:08 +01:00
federated Fix warnings and bug spotted by gcc-4.3. 2008-12-16 10:12:22 -02:00
heap Fix warnings and bug spotted by gcc-4.3. 2008-12-16 10:12:22 -02:00
innobase BUG#42445 Warning messages in innobase/handler/ha_innodb.cc 2009-02-03 11:36:46 +00:00
myisam Bug#41098: Query Cache returns wrong result with concurrent insert 2009-02-19 18:09:35 -03:00
myisammrg Bug#40675 MySQL 5.1 crash with index merge algorithm and Merge tables 2009-02-12 16:42:07 +05:30
ndb merge: 5.1 -> 5.1-rpl 2009-01-08 19:03:56 +00:00
Makefile.am Many files: 2006-12-31 02:29:11 +01:00