diff options
author | unknown <jan@hundin.mysql.fi> | 2005-07-22 14:10:03 +0300 |
---|---|---|
committer | unknown <jan@hundin.mysql.fi> | 2005-07-22 14:10:03 +0300 |
commit | 6fd13aaa3ccc470f03c51686f781651c9709154e (patch) | |
tree | 883851cd5501311efd796192fc3f483fd158d9d6 /sql/ha_innodb.h | |
parent | adf5fdcd7413c110b2b27f118f41eb249c781e4e (diff) | |
download | mariadb-git-6fd13aaa3ccc470f03c51686f781651c9709154e.tar.gz |
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.
Diffstat (limited to 'sql/ha_innodb.h')
-rw-r--r-- | sql/ha_innodb.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index 1584a2182c9..2cbc1c8d91b 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -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 */ |