mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03: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:
@ -310,3 +310,32 @@ int innobase_xa_end(THD *thd);
|
||||
|
||||
int innobase_repl_report_sent_binlog(THD *thd, char *log_file_name,
|
||||
my_off_t end_offset);
|
||||
|
||||
/***********************************************************************
|
||||
This function creates a consistent view for a cursor and start a transaction
|
||||
if it has not been started. This consistent view is then used inside of MySQL
|
||||
when accesing records using a cursor. */
|
||||
|
||||
void*
|
||||
innobase_create_cursor_view(void);
|
||||
/*=============================*/
|
||||
/* out: Pointer to cursor view or NULL */
|
||||
|
||||
/***********************************************************************
|
||||
This function closes the given consistent cursor view. Note that
|
||||
global read view is restored to a transaction and a transaction is
|
||||
started if it has not been started. */
|
||||
|
||||
void
|
||||
innobase_close_cursor_view(
|
||||
/*=======================*/
|
||||
void* curview); /* in: Consistent read view to be closed */
|
||||
|
||||
/***********************************************************************
|
||||
This function sets the given consistent cursor view to a transaction.
|
||||
If a transaction does not exist, transaction is started. */
|
||||
|
||||
void
|
||||
innobase_set_cursor_view(
|
||||
/*=====================*/
|
||||
void* curview); /* in: Consistent read view to be closed */
|
||||
|
Reference in New Issue
Block a user