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

@ -2183,6 +2183,9 @@ dispatch_command_return dispatch_command(enum enum_server_command command, THD *
if (trans_commit_implicit(thd))
break;
thd->release_transactional_locks();
if (options & REFRESH_STATUS &&
!(thd->variables.old_behavior & OLD_MODE_OLD_FLUSH_STATUS))
options= (options & ~REFRESH_STATUS) | REFRESH_SESSION_STATUS;
if ((options & ~REFRESH_SESSION_STATUS) &&
check_global_access(thd,RELOAD_ACL))
break;
@ -5277,6 +5280,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
#ifdef HAVE_QUERY_CACHE
REFRESH_QUERY_CACHE_FREE |
#endif /* HAVE_QUERY_CACHE */
REFRESH_STATUS |
REFRESH_SESSION_STATUS |
REFRESH_GLOBAL_STATUS |
REFRESH_USER_RESOURCES))