diff options
author | unknown <knielsen@knielsen-hq.org> | 2014-02-07 19:15:28 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2014-02-07 19:15:28 +0100 |
commit | 4e6606acad4ad0ea75dec114ad316e0325efaf02 (patch) | |
tree | abb53cd21ab57261299ec9c96fef4089f7025d1d /sql/mysqld.h | |
parent | ce02738d7f2f2688eeec7004dd6a30293d36044f (diff) | |
download | mariadb-git-4e6606acad4ad0ea75dec114ad316e0325efaf02.tar.gz |
MDEV-4984: Implement MASTER_GTID_WAIT() and @@LAST_GTID.
MASTER_GTID_WAIT() is similar to MASTER_POS_WAIT(), but works with a
GTID position rather than an old-style filename/offset.
@@LAST_GTID gives the GTID assigned to the last transaction written
into the binlog.
Together, the two can be used by applications to obtain the GTID of
an update on the master, and then do a MASTER_GTID_WAIT() for that
position on any read slave where it is important to get results that
are caught up with the master at least to the point of the update.
The implementation of MASTER_GTID_WAIT() is implemented in a way
that tries to minimise the performance impact on the SQL threads,
even in the presense of many waiters on single GTID positions (as
from @@LAST_GTID).
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r-- | sql/mysqld.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h index 2e10b0caeb5..4fdd34fd8be 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -256,6 +256,7 @@ extern PSI_mutex_key key_LOCK_slave_state, key_LOCK_binlog_state, extern PSI_mutex_key key_LOCK_stats, key_LOCK_global_user_client_stats, key_LOCK_global_table_stats, key_LOCK_global_index_stats, key_LOCK_wakeup_ready, key_LOCK_wait_commit; +extern PSI_mutex_key key_LOCK_gtid_waiting; extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, @@ -285,6 +286,7 @@ extern PSI_cond_key key_RELAYLOG_COND_queue_busy; extern PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy; extern PSI_cond_key key_COND_rpl_thread, key_COND_rpl_thread_pool, key_COND_parallel_entry; +extern PSI_cond_key key_COND_wait_gtid; extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert, key_thread_handle_manager, key_thread_kill_server, key_thread_main, |