mirror of
https://github.com/MariaDB/server.git
synced 2026-05-11 01:20:15 +02:00
BUG#39249 Maria:query cache returns out of date results
BUG#41098 Query Cache returns wrong result with concurent insert BUILD/SETUP.sh: test build without query cache setup BUILD/compile-pentium-debug-max-no-qc: test build without query cache sql/mysql_priv.h: removed double declaration storage/maria/ha_maria.cc: query cache invalidation fixed storage/maria/ma_state.c: query cache invalidation fixed storage/maria/maria_def.h: last transaction ID added invalidation fixed storage/myisam/ha_myisam.cc: invalidation fixed storage/myisam/mi_locking.c: invalidation fixed storage/myisam/myisamdef.h: invalidation fixed
This commit is contained in:
parent
d50e99c9f6
commit
0c0e1f2e35
9 changed files with 43 additions and 3 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <my_bit.h>
|
||||
#include "ha_maria.h"
|
||||
#include "trnman_public.h"
|
||||
#include "trnman.h"
|
||||
|
||||
C_MODE_START
|
||||
#include "maria_def.h"
|
||||
|
|
@ -907,6 +908,8 @@ int ha_maria::open(const char *name, int mode, uint test_if_locked)
|
|||
if (!(file= maria_open(name, mode, test_if_locked | HA_OPEN_FROM_SQL_LAYER)))
|
||||
return (my_errno ? my_errno : -1);
|
||||
|
||||
file->s->chst_invalidator= query_cache_invalidate_by_MyISAM_filename_ref;
|
||||
|
||||
if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE))
|
||||
VOID(maria_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0));
|
||||
|
||||
|
|
@ -3227,6 +3230,9 @@ my_bool ha_maria::register_query_cache_table(THD *thd, char *table_name,
|
|||
*/
|
||||
*engine_data= 0;
|
||||
|
||||
if (file->s->now_transactional && file->s->have_versioning)
|
||||
return (file->trn->trid >= file->s->state.last_change_trn);
|
||||
|
||||
/*
|
||||
If a concurrent INSERT has happened just before the currently processed
|
||||
SELECT statement, the total size of the table is unknown.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue