diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-11-07 22:37:43 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-11-07 22:37:43 +0100 |
commit | 7322e38827ce50f86e3facbb63d9c77e744da6df (patch) | |
tree | 8e9100d053c0c73b30cb1fdd4c1b65650cb595cf /sql/log.h | |
parent | a2d921be3634ceff4ab4c67f57b27a481d4a28df (diff) | |
download | mariadb-git-7322e38827ce50f86e3facbb63d9c77e744da6df.tar.gz |
MWL#136: Cross-engine consistency for START TRANSACTION WITH CONSISTENT SNAPSHOT
Make the binlog handlerton participate in START TRANSACTION WITH CONSISTENT
SNAPSHOT, recording the binlog position corresponding to the snapshot taken
in other MVCC storage engines.
Expose this consistent binlog position as the new status variables
binlog_trx_file and binlog_trx_position. This enables to get a fully
non-locking snapshot of the database (including binlog position for
slave provisioning), avoiding the need for FLUSH TABLES WITH READ LOCK.
Modify mysqldump to detect if the server supports this new feature, and
if so, avoid FLUSH TABLES WITH READ LOCK for --single-transaction
--master-data snapshot backups.
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/log.h b/sql/log.h index fcc9d5a711b..e2266114e81 100644 --- a/sql/log.h +++ b/sql/log.h @@ -406,6 +406,12 @@ public: */ Format_description_log_event *description_event_for_exec, *description_event_for_queue; + /* + Binlog position of last commit (or non-transactional write) to the binlog. + Access to this is protected by LOCK_commit_ordered. + */ + char last_commit_pos_file[FN_REFLEN]; + my_off_t last_commit_pos_offset; MYSQL_BIN_LOG(); /* @@ -521,7 +527,7 @@ public: inline void unlock_index() { pthread_mutex_unlock(&LOCK_index);} inline IO_CACHE *get_index_file() { return &index_file;} inline uint32 get_open_count() { return open_count; } - void set_status_variables(); + void set_status_variables(THD *thd); }; class Log_event_handler |