mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
4e6606acad
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).
9 lines
301 B
Text
9 lines
301 B
Text
SELECT @@global.last_gtid;
|
|
ERROR HY000: Variable 'last_gtid' is a SESSION variable
|
|
SET GLOBAL last_gtid= 10;
|
|
ERROR HY000: Variable 'last_gtid' is a read only variable
|
|
SET SESSION last_gtid= 20;
|
|
ERROR HY000: Variable 'last_gtid' is a read only variable
|
|
SELECT @@session.last_gtid;
|
|
@@session.last_gtid
|
|
|