1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-30189 Add remaining replication options as system variables

Promote the last few SQL-inaccessible replication options (command line
or `mariadb.cnf`) as these GLOBAL read-only system variables:
```
@@master_info_file
@@replicate_same_server_id
@@show_slave_auth_info
```

Side effect: The latter two options changed from no argument
to optional argument. Quote `include/my_getopt.h`:
> It should be noted that for historical reasons variables with the
> combination arg_type=NO_ARG, my_option::var_type=GET_BOOL still
> accepts arguments. This is someone counter intuitive and care should
> be taken if the code is refactored.

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
ParadoxV5
2025-03-11 22:48:54 -06:00
parent 74c189c312
commit c29e83f226
12 changed files with 162 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
# GLOBAL scope
SELECT @@GLOBAL.master_info_file;
@@GLOBAL.master_info_file
30189.info
SELECT @@master_info_file;
@@master_info_file
30189.info
# Not SESSION scope
SELECT @@SESSION.master_info_file;
ERROR HY000: Variable 'master_info_file' is a GLOBAL variable
# Read-only
SET @@master_info_file= 'master.info';
ERROR HY000: Variable 'master_info_file' is a read only variable
SET @@GLOBAL.master_info_file= 'master.info';
ERROR HY000: Variable 'master_info_file' is a read only variable
SET @@SESSION.master_info_file= 'master.info';
ERROR HY000: Variable 'master_info_file' is a read only variable