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

MDEV-33145 support for old-mode=OLD_FLUSH_STATUS

add old-mode that restores inconsistent legacy behavior for FLUSH STATUS.
It doesn't affect FLUSH { SESSION | GLOBAL } STATUS.
This commit is contained in:
Sergei Golubchik
2024-05-19 16:52:23 +02:00
parent 9ecec1f730
commit 9293d40fa7
15 changed files with 126 additions and 10 deletions

View File

@ -506,4 +506,32 @@ let $new_local_flush_status= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESS
--evalp select $new_local_flush_status >= $local_flush_status as "1"
--evalp select $new_global_flush_status < $new_local_flush_status as "1"
#
# Test OLD_FLUSH_STATUS
#
create or replace table t1 (a int, key(a)) engine=MyISAM;
insert into t1 values (1),(2);
--connect con1,localhost,root
set old_mode=OLD_FLUSH_STATUS;
insert into t1 values (3),(4);
drop table t1;
select t1.variable_name, t1.variable_value as global_value, t2.variable_value as session_value
from information_schema.global_status t1 join information_schema.session_status t2
on t1.variable_name = t2.variable_name
where t1.variable_name in ('Key_writes','Com_insert');
flush status;
select t1.variable_name, t1.variable_value as global_value, t2.variable_value as session_value
from information_schema.global_status t1 join information_schema.session_status t2
on t1.variable_name = t2.variable_name
where t1.variable_name in ('Key_writes','Com_insert');
disconnect con1;
connection default;
--echo # end of 11.5 tests