mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 00:05:33 +02:00
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.
This commit is contained in:
parent
adf5fdcd74
commit
6fd13aaa3c
8 changed files with 294 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue