MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Classes | |
struct | CreateView |
Functions | |
UNIV_INLINE read_view_t * | read_view_create_low (ulint n, mem_heap_t *heap) |
UNIV_INLINE read_view_t * | read_view_clone (const read_view_t *view, mem_heap_t *heap) |
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_INTERN void | read_view_close_for_mysql (trx_t *trx) |
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) |
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.
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.
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 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_INLINE read_view_t* read_view_clone | ( | const read_view_t * | view, |
mem_heap_t * | heap | ||
) |
Clones a read view object. This function will allocate space for two read views contiguously, one identical in size and content as
view | (starting at returned pointer) and another view immediately following the trx_ids array. The second view will have space for an extra trx_id_t element. |
view | in: view to clone |
heap | in: memory heap from which allocated |
Definition at line 207 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.
trx | in: trx which has a read view |
Definition at line 484 of file read0read.cc.
UNIV_INLINE read_view_t* read_view_create_low | ( | ulint | n, |
mem_heap_t * | heap | ||
) |
Creates a read view object.
n | in: number of cells in the trx_ids array |
heap | in: memory heap from which allocated |
Definition at line 182 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.
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.
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, 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.