summaryrefslogtreecommitdiff
path: root/storage/maria/ha_maria.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2009-10-14 11:09:56 +0300
committerMichael Widenius <monty@askmonty.org>2009-10-14 11:09:56 +0300
commit75a949fb414f8b3ed851a466d84788085c9dbe42 (patch)
treefc434ac8f8707ed8bf569798a7f58a2f8cf331a5 /storage/maria/ha_maria.cc
parentfb146de092a662a2da11fb7b5b1c1ff9ef8a2c57 (diff)
parent9f3a7c30e2cb1d9b4034acd3c57f037162a9976e (diff)
downloadmariadb-git-75a949fb414f8b3ed851a466d84788085c9dbe42.tar.gz
Automatic merge with 5.1-merge
Diffstat (limited to 'storage/maria/ha_maria.cc')
-rw-r--r--storage/maria/ha_maria.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index baa40cc0037..a4d72f15285 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -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"
@@ -918,6 +919,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));
@@ -3238,6 +3241,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.