1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-27730 Add PLUGIN_VAR_DEPRECATED flag to plugin variables

The sys_var class has the deprecation_substitute member to mark the
deprecated variables. As it's set, the server produces warnings when
these variables are used. However, the plugin has no means to utilize
that functionality.

So, the PLUGIN_VAR_DEPRECATED flag is introduced to set the
deprecation_substitute with the empty string. A non-empty string can
make the warning more informative, but there's no nice way seen to
specify it, and not that needed at the moment.
This commit is contained in:
Nayuta Yanagisawa
2022-02-15 16:18:55 +09:00
parent 5b237e5965
commit 66f55a018b
5 changed files with 19 additions and 5 deletions

View File

@ -40,11 +40,15 @@ a
set global example_ulong_var=500;
set global example_enum_var= e1;
set session example_int_var= -1;
set global example_deprecated_var=1;
Warnings:
Warning 1287 '@@example_deprecated_var' is deprecated and will be removed in a future release
show status like 'example%';
Variable_name Value
Example_func_example enum_var is 0, ulong_var is 500, int_var is -1, double_var is 8.500000, really
show variables like 'example%';
Variable_name Value
example_deprecated_var 0
example_double_thdvar 8.500000
example_double_var 8.500000
example_enum_var e1