mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
52 lines
1.9 KiB
Text
52 lines
1.9 KiB
Text
--source include/master-slave.inc
|
|
|
|
connection master;
|
|
-- disable_warnings
|
|
DROP TABLE IF EXISTS t;
|
|
-- enable_warnings
|
|
CREATE TABLE t(id INT);
|
|
SELECT * from t;
|
|
|
|
sync_slave_with_master;
|
|
|
|
connection slave;
|
|
SELECT * from t;
|
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
|
source include/percona_query_response_time_flush.inc;
|
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON;
|
|
|
|
connection master;
|
|
INSERT INTO t VALUES(0);
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
INSERT INTO t VALUES(1);
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
sync_slave_with_master;
|
|
|
|
connection slave;
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
|
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
|
source include/percona_query_response_time_flush.inc;
|
|
|
|
connection master;
|
|
INSERT INTO t VALUES(0);
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
INSERT INTO t VALUES(1);
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
sync_slave_with_master;
|
|
|
|
connection slave;
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
|
|
|
connection master;
|
|
DROP TABLE IF EXISTS t;
|
|
sync_slave_with_master;
|
|
connection slave;
|
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF;
|