mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Add Master_gtid_wait_{count,time,timeouts} status
MASTER_GTID_WAIT function needs some status to evaluate its use. master_gtid_wait_count indicates how many times the function is called. master_gtid_wait_time indicates how much time in microseconds occurred waiting (or timing out) master_gtid_timeouts indicates how many time times this function timed out rather than all successful gtids events being available.
This commit is contained in:
@@ -231,6 +231,15 @@ NULL
|
||||
SELECT master_gtid_wait('', NULL);
|
||||
master_gtid_wait('', NULL)
|
||||
0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_count';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_count 1
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_timeouts 0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_time';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_time 0
|
||||
SELECT master_gtid_wait(@pos, 0.5);
|
||||
master_gtid_wait(@pos, 0.5)
|
||||
-1
|
||||
@@ -271,13 +280,43 @@ SELECT master_gtid_wait('2-1-5');
|
||||
SELECT master_gtid_wait('2-1-10');
|
||||
SELECT master_gtid_wait('2-1-5,1-1-4,0-1-110');
|
||||
SELECT master_gtid_wait('2-1-2');
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_timeouts 0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_count';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_count 3
|
||||
SELECT master_gtid_wait('1-1-1');
|
||||
master_gtid_wait('1-1-1')
|
||||
0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_timeouts 0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_count';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_count 4
|
||||
SELECT MASTER_GTID_WAIT_TIME <= 1000000 AS Master_gtid_wait_less_than_second;
|
||||
Master_gtid_wait_less_than_second
|
||||
1
|
||||
SELECT master_gtid_wait('0-1-109');
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_timeouts 0
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_count';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_count 4
|
||||
SELECT master_gtid_wait('2-1-2', 0.5);
|
||||
master_gtid_wait('2-1-2', 0.5)
|
||||
-1
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_timeouts';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_timeouts 1
|
||||
SHOW STATUS LIKE 'Master_gtid_wait_count';
|
||||
Variable_name Value
|
||||
Master_gtid_wait_count 5
|
||||
SELECT MASTER_GTID_WAIT_TIME BETWEEN 500000 AND 3000000 AS Master_gtid_wait_time_between_half_and_3_seconds;
|
||||
Master_gtid_wait_time_between_half_and_3_seconds
|
||||
1
|
||||
KILL QUERY KILL_ID;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
SET gtid_domain_id=2;
|
||||
@@ -433,6 +472,5 @@ a
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
Reference in New Issue
Block a user