1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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

@ -488,4 +488,29 @@ select $new_local_flush_status >= $local_flush_status as "1";
select $new_global_flush_status < $new_local_flush_status as "1";
1
1
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;
Warnings:
Warning 1287 'OLD_FLUSH_STATUS' is deprecated and will be removed in a future release
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');
variable_name global_value session_value
COM_INSERT 2 1
KEY_WRITES 2 2
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');
variable_name global_value session_value
COM_INSERT 2 0
KEY_WRITES 0 0
disconnect con1;
connection default;
# end of 11.5 tests