1
0
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:
jan@hundin.mysql.fi
2005-07-22 14:10:03 +03:00
parent 5ac22d0446
commit 7d5e724c40
8 changed files with 294 additions and 13 deletions

View File

@ -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 */