1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-33145 Add FLUSH GLOBAL STATUS

- 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.
This commit is contained in:
Monty
2023-12-31 16:23:04 +02:00
committed by Sergei Golubchik
parent d2b39a2c82
commit 775cba4d0f
325 changed files with 787 additions and 525 deletions

View File

@ -52,6 +52,32 @@ EOF
--error 1
--exec $MYSQLADMIN -u root -p 2>&1 > /dev/null
--echo #
--echo # MDEV-33992 mariadb-admin flush-status command should do
--echo # FLUSH GLOBAL STATUS
--echo #
flush session status;
flush global status;
--connect (con1,localhost,root,)
--connect (con2,localhost,root,)
--connect (con3,localhost,root,)
--disconnect con1
--disconnect con2
--disconnect con3
--connection default
show status like 'Max_used_connections';
show global status like 'Max_used_connections';
--echo #
--echo # Running mariadb-admin flush-status
--echo #
--exec $MYSQLADMIN flush-status
show status like 'Max_used_connections';
show global status like 'Max_used_connections';
#
# MDEV-19168 Reload SSL certificate
# This test reloads server SSL certs ./mysqladmin flush-ssl, and checks that new SSL
@ -96,3 +122,5 @@ remove_file $ssl_key;
# restart with usual SSL
let $restart_parameters=;
--source include/restart_mysqld.inc
--echo # End of 11.5