summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <jan@hundin.mysql.fi>2005-07-22 14:10:03 +0300
committerunknown <jan@hundin.mysql.fi>2005-07-22 14:10:03 +0300
commit6fd13aaa3ccc470f03c51686f781651c9709154e (patch)
tree883851cd5501311efd796192fc3f483fd158d9d6 /innobase/row
parentadf5fdcd7413c110b2b27f118f41eb249c781e4e (diff)
downloadmariadb-git-6fd13aaa3ccc470f03c51686f781651c9709154e.tar.gz
Implement MySQL framework to support consistent read views in
cursors for InnoDB. The idea of the patch is that if MySQL requests a consistent read view, we open one when open a cursor, set is as the active view to a transaction when fetch from the cursor, and close together with cursor close. This patch is associated to bugs #11813, #11832, and #11833. Contains after review fixes.
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0sel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 15439bed7e7..602f5855171 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -4083,6 +4083,11 @@ normal_return:
}
func_exit:
+ /* Restore a global read view back to transaction. This forces
+ MySQL always to set cursor view before fetch if it is used. */
+
+ trx->read_view = trx->global_read_view;
+
trx->op_info = "";
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
@@ -4136,7 +4141,8 @@ row_search_check_if_query_cache_permitted(
&& !trx->read_view) {
trx->read_view = read_view_open_now(trx,
- trx->read_view_heap);
+ trx->global_read_view_heap);
+ trx->global_read_view = trx->read_view;
}
}