MySQL 5.6.14 Source Code Document
|
#include "univ.i"
#include "ut0byte.h"
#include "ut0lst.h"
#include "trx0trx.h"
#include "read0types.h"
#include "read0read.ic"
Go to the source code of this file.
Classes | |
struct | read_view_t |
struct | cursor_view_t |
Macros | |
#define | VIEW_NORMAL 1 |
#define | VIEW_HIGH_GRANULARITY 2 |
Functions | |
UNIV_INTERN read_view_t * | read_view_open_now (trx_id_t cr_trx_id, mem_heap_t *heap) |
UNIV_INTERN read_view_t * | read_view_purge_open (mem_heap_t *heap) |
UNIV_INLINE void | read_view_remove (read_view_t *view, bool own_mutex) |
UNIV_INTERN void | read_view_close_for_mysql (trx_t *trx) |
UNIV_INLINE bool | read_view_sees_trx_id (const read_view_t *view, trx_id_t trx_id) __attribute__((nonnull |
UNIV_INTERN void | read_view_print (const read_view_t *view) |
UNIV_INTERN cursor_view_t * | read_cursor_view_create_for_mysql (trx_t *cr_trx) |
UNIV_INTERN void | read_cursor_view_close_for_mysql (trx_t *trx, cursor_view_t *curview) |
UNIV_INTERN void | read_cursor_set_for_mysql (trx_t *trx, cursor_view_t *curview) |
Variables | |
UNIV_INLINE bool | warn_unused_result |
#define VIEW_HIGH_GRANULARITY 2 |
High-granularity read view where transaction does not see changes made by active transactions and own changes after a point in time when this read view was created.
Definition at line 168 of file read0read.h.
#define VIEW_NORMAL 1 |
Read view types Normal consistent read view where transaction does not see changes made by active transactions except creating transaction.
Definition at line 164 of file read0read.h.
UNIV_INTERN void read_cursor_set_for_mysql | ( | trx_t * | trx, |
cursor_view_t * | curview | ||
) |
This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view. in: consistent cursor view to be set
This function sets a given consistent cursor view to a transaction read view if given consistent cursor view is not NULL. Otherwise, function restores a global read view to a transaction read view.
trx | in: transaction where cursor is set |
curview | in: consistent cursor view to be set |
Definition at line 636 of file read0read.cc.
UNIV_INTERN void read_cursor_view_close_for_mysql | ( | trx_t * | trx, |
cursor_view_t * | curview | ||
) |
Close a given consistent cursor view for mysql and restore global read view back to a transaction read view. in: cursor view to be closed
Close a given consistent cursor view for mysql and restore global read view back to a transaction read view.
trx | in: trx |
curview | in: cursor view to be closed |
Definition at line 610 of file read0read.cc.
UNIV_INTERN cursor_view_t* read_cursor_view_create_for_mysql | ( | trx_t * | cr_trx | ) |
Create a consistent cursor view for mysql to be used in cursors. In this consistent read view modifications done by the creating transaction or future transactions are not visible. in: trx where cursor view is created
Create a high-granularity consistent cursor view for mysql to be used in cursors. In this consistent read view modifications done by the creating transaction after the cursor is created or future transactions are not visible.
cr_trx | in: trx where cursor view is created |
Definition at line 543 of file read0read.cc.
UNIV_INTERN void read_view_close_for_mysql | ( | trx_t * | trx | ) |
Closes a consistent read view for MySQL. This function is called at an SQL statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. in: trx which has a read view
Closes a consistent read view for MySQL. This function is called at an SQL statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED.
trx | in: trx which has a read view |
Definition at line 484 of file read0read.cc.
UNIV_INTERN read_view_t* read_view_open_now | ( | trx_id_t | cr_trx_id, |
mem_heap_t * | heap | ||
) |
Opens a read view where exactly the transactions serialized before this point in time are seen in the view.
Opens a read view where exactly the transactions serialized before this point in time are seen in the view.
cr_trx_id | in: trx_id of creating transaction, or 0 used in purge |
heap | in: memory heap from which allocated |
Definition at line 377 of file read0read.cc.
UNIV_INTERN void read_view_print | ( | const read_view_t * | view | ) |
Prints a read view to stderr. in: read view
Prints a read view to stderr.
view | in: read view |
Definition at line 502 of file read0read.cc.
UNIV_INTERN read_view_t* read_view_purge_open | ( | mem_heap_t * | heap | ) |
Makes a copy of the oldest existing read view, or opens a new. The view must be closed with ..._close.
Makes a copy of the oldest existing read view, with the exception that also the creating trx of the oldest view is set as not visible in the 'copied' view. Opens a new view if no views currently exist. The view must be closed with ..._close. This is used in purge.
heap | in: memory heap from which allocated |
Definition at line 403 of file read0read.cc.
UNIV_INLINE void read_view_remove | ( | read_view_t * | view, |
bool | own_mutex | ||
) |
Remove a read view from the trx_sys->view_list. in: true if caller owns the trx_sys_t::mutex
view | in: read view, can be 0 |
UNIV_INLINE bool read_view_sees_trx_id | ( | const read_view_t * | view, |
trx_id_t | trx_id | ||
) |
Checks if a read view sees the specified transaction.
view | in: read view |
trx_id | in: trx id |