[MDEV-33076] GLOBAL_VALUE_ORIGIN is shown wrongly if variable value was set via alias Created: 2023-12-19  Updated: 2023-12-19

Status: Open
Project: MariaDB Server
Component/s: Information Schema
Affects Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

We have several aliases among system variables (when the same variable has more than one name), for backward compatibility or external compatibility purposes.

When such a variable is set at runtime via one name, the value is naturally updated for both, but the source of the value isn't:

set @val= @@global.default_storage_engine;
 
select variable_name, global_value, global_value_origin from information_schema.system_variables where variable_name in ('storage_engine','default_storage_engine');
set global storage_engine= Aria;
select variable_name, global_value, global_value_origin from information_schema.system_variables where variable_name in ('storage_engine','default_storage_engine');
 
# Cleanup
set global default_storage_engine= @val;

10.4 87a5d16911bb94d383480fdd49e20876ed1400f2

set global storage_engine= Aria;
select variable_name, global_value, global_value_origin from information_schema.system_variables where variable_name in ('storage_engine','default_storage_engine');
variable_name	global_value	global_value_origin
DEFAULT_STORAGE_ENGINE	Aria	COMPILE-TIME
STORAGE_ENGINE	Aria	SQL

In the output above, for both variables global_value_origin should now be SQL, but it's only set for the variable which was actually used in the statement.


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