[MDEV-29629] Session state tracking does not track variable changes via aliases Created: 2022-09-24  Updated: 2023-09-17  Resolved: 2023-09-17

Status: Closed
Project: MariaDB Server
Component/s: Variables
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 11.1.1

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: upstream

Issue Links:
Relates
relates to MDEV-7567 rename slow queries variables Closed
relates to MDEV-8931 (server part of) session state tracking Closed
relates to MDEV-29297 remove aliases of system variables Open
relates to MDEV-31746 Problems with tx_isolation after MDEV... Closed

 Description   

If variable X is set to be tracked, and it has an alias X_ALIAS, and its value changes, tracking does not occur. I'm not sure whether it should (MySQL documentation at least doesn't say one way or another), but it would be logical for the purpose of having a consistent session state.

--enable_session_track_info
 
--echo #
--echo # Only max_delayed_threads is set for tracking,
--echo # the value changed via a synonym -- no tracking
--echo #
 
SET session_track_system_variables='max_delayed_threads';
 
SELECT @@max_delayed_threads;
SET max_insert_delayed_threads= 0;
 
--echo #
--echo # Both max_delayed_threads and the synonym are set for tracking,
--echo # the value changed via a synonym - only the synonym tracked
--echo #
 
SET session_track_system_variables='max_insert_delayed_threads,max_delayed_threads';
 
SELECT @@max_delayed_threads;
SET max_insert_delayed_threads= DEFAULT;

10.10 87e8463e

#
# Only max_delayed_threads is set for tracking,
# the value changed via a synonym -- no tracking
#
SET session_track_system_variables='max_delayed_threads';
SELECT @@max_delayed_threads;
@@max_delayed_threads
20
SET max_insert_delayed_threads= 0;

#
# Both max_delayed_threads and the synonym are set for tracking,
# the value changed via a synonym - only the synonym tracked
#
SET session_track_system_variables='max_insert_delayed_threads,max_delayed_threads';
SELECT @@max_delayed_threads;
@@max_delayed_threads
0
SET max_insert_delayed_threads= DEFAULT;
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- max_insert_delayed_threads
-- 20



 Comments   
Comment by Daniel Black [ 2023-07-27 ]

implemented in MDEV-31746. If a backport isn't desired we can close this as a duplicate.

Generated at Thu Feb 08 10:10:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.