mirror of
https://github.com/MariaDB/server.git
synced 2025-02-12 00:15:35 +01:00
![Monty](/assets/img/avatar_default.png)
- FLUSH GLOBAL STATUS now resets most global_status_vars. At this stage, this is mainly to be used for testing. - FLUSH SESSION STATUS added as an alias for FLUSH STATUS. - FLUSH STATUS does not require any privilege (before required RELOAD). - FLUSH GLOBAL STATUS requires RELOAD privilege. - All global status reset moved to FLUSH GLOBAL STATUS. - Replication semisync status variables are now reset by FLUSH GLOBAL STATUS. - In test cases, the only changes are: - Replace FLUSH STATUS with FLUSH GLOBAL STATUS - Replace FLUSH STATUS with FLUSH STATUS; FLUSH GLOBAL STATUS. This was only done in a few tests where the test was using SHOW STATUS for both local and global variables. - Uptime_since_flush_status is now always provided, independent if ENABLED_PROFILING is enabled when compiling MariaDB. - @@global.Uptime_since_flush_status is reset on FLUSH GLOBAL STATUS and @@session.Uptime_since_flush_status is reset on FLUSH SESSION STATUS. - When connected, @@session.Uptime_since_flush_status is set to 0.
106 lines
2.6 KiB
Text
106 lines
2.6 KiB
Text
CREATE USER user1@localhost;
|
|
CREATE USER user2@localhost;
|
|
CREATE USER user3@localhost;
|
|
grant ALL on *.* to user1@localhost;
|
|
grant ALL on *.* to user2@localhost;
|
|
grant ALL on *.* to user3@localhost;
|
|
TRUNCATE TABLE performance_schema.accounts;
|
|
FLUSH PRIVILEGES;
|
|
CREATE TABLE test.t_range(a int, b int, PRIMARY KEY(a));
|
|
INSERT INTO test.t_range values (1, 1), (2,2), (3, 3), (4, 4), (5, 5);
|
|
INSERT INTO test.t_range values (6, 6), (7,7), (8, 8), (9, 9), (10, 10);
|
|
FLUSH GLOBAL STATUS;
|
|
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
|
|
a b
|
|
3 3
|
|
4 4
|
|
5 5
|
|
SELECT * from performance_schema.session_status
|
|
WHERE VARIABLE_NAME = 'Select_range';
|
|
VARIABLE_NAME VARIABLE_VALUE
|
|
Select_range 1
|
|
VARIABLE_NAME DELTA
|
|
Select_range 1
|
|
connect con1, localhost, user1,,;
|
|
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
|
|
a b
|
|
3 3
|
|
4 4
|
|
5 5
|
|
SELECT * from performance_schema.session_status
|
|
WHERE VARIABLE_NAME = 'Select_range';
|
|
VARIABLE_NAME VARIABLE_VALUE
|
|
Select_range 1
|
|
VARIABLE_NAME DELTA
|
|
Select_range 2
|
|
connect con2, localhost, user2,,;
|
|
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
|
|
a b
|
|
3 3
|
|
4 4
|
|
5 5
|
|
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
|
|
a b
|
|
4 4
|
|
5 5
|
|
6 6
|
|
SELECT * from performance_schema.session_status
|
|
WHERE VARIABLE_NAME = 'Select_range';
|
|
VARIABLE_NAME VARIABLE_VALUE
|
|
Select_range 2
|
|
VARIABLE_NAME DELTA
|
|
Select_range 4
|
|
connect con3, localhost, user3,,;
|
|
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
|
|
a b
|
|
3 3
|
|
4 4
|
|
5 5
|
|
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
|
|
a b
|
|
4 4
|
|
5 5
|
|
6 6
|
|
SELECT * from test.t_range where (a >= 5) AND (a <= 7);
|
|
a b
|
|
5 5
|
|
6 6
|
|
7 7
|
|
SELECT * from performance_schema.session_status
|
|
WHERE VARIABLE_NAME = 'Select_range';
|
|
VARIABLE_NAME VARIABLE_VALUE
|
|
Select_range 3
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
connection default;
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
SELECT `USER`, `HOST`, VARIABLE_NAME, VARIABLE_VALUE
|
|
FROM performance_schema.status_by_account WHERE VARIABLE_NAME = 'Select_range'
|
|
AND `USER` LIKE 'user%'
|
|
ORDER BY `USER`;
|
|
USER HOST VARIABLE_NAME VARIABLE_VALUE
|
|
user1 localhost Select_range 1
|
|
user2 localhost Select_range 2
|
|
user3 localhost Select_range 3
|
|
disconnect con1;
|
|
disconnect con2;
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
TRUNCATE TABLE performance_schema.accounts;
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
disconnect con3;
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
TRUNCATE TABLE performance_schema.accounts;
|
|
VARIABLE_NAME DELTA
|
|
Select_range 7
|
|
DROP TABLE test.t_range;
|
|
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
|
|
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user2@localhost;
|
|
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user3@localhost;
|
|
DROP USER user1@localhost;
|
|
DROP USER user2@localhost;
|
|
DROP USER user3@localhost;
|
|
FLUSH PRIVILEGES;
|