mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22570 Implement wsrep_provider_options as plugin
- Provider options are read from the provider during startup, before plugins are initialized. - New wsrep_provider plugin for which sysvars are generated dynamically from options read from the provider. - The plugin is enabled by option plugin-wsrep-provider=ON. If enabled, wsrep_provider_options can no longer be used, (an error is raised on attempts to do so). - Each option is either string, integer, double or bool - Options can be dynamic / readonly - Options can be deprecated Limitations: - We do not check that the value of a provider option falls within a certain range. This type of validation is still done in Galera side. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
committed by
Sergei Golubchik
parent
061ea3f639
commit
79d0194eef
65
mysql-test/suite/wsrep/r/wsrep_provider_plugin_basic.result
Normal file
65
mysql-test/suite/wsrep/r/wsrep_provider_plugin_basic.result
Normal file
@@ -0,0 +1,65 @@
|
||||
select variable_type, global_value from information_schema.system_variables where variable_name = 'wsrep_provider_socket_recv_buf_size';
|
||||
variable_type global_value
|
||||
VARCHAR auto
|
||||
set global wsrep_provider_socket_recv_buf_size = 'foo';
|
||||
ERROR 42000: Variable 'socket_recv_buf_size' can't be set to the value of 'foo'
|
||||
set global wsrep_provider_socket_recv_buf_size = '1M';
|
||||
show global variables like 'wsrep_provider_socket_recv_buf_size';
|
||||
Variable_name Value
|
||||
wsrep_provider_socket_recv_buf_size 1M
|
||||
set global wsrep_provider_socket_recv_buf_size = default;
|
||||
show global variables like 'wsrep_provider_socket_recv_buf_size';
|
||||
Variable_name Value
|
||||
wsrep_provider_socket_recv_buf_size auto
|
||||
select variable_type, global_value from information_schema.system_variables where variable_name = 'wsrep_provider_evs_send_window';
|
||||
variable_type global_value
|
||||
BIGINT 4
|
||||
set global wsrep_provider_evs_send_window = -10;
|
||||
ERROR 42000: Variable 'evs_send_window' can't be set to the value of '-10'
|
||||
set global wsrep_provider_evs_send_window = 10;
|
||||
show global variables like 'wsrep_provider_evs_send_window';
|
||||
Variable_name Value
|
||||
wsrep_provider_evs_send_window 10
|
||||
set global wsrep_provider_evs_send_window = default;
|
||||
show global variables like 'wsrep_provider_evs_send_window';
|
||||
Variable_name Value
|
||||
wsrep_provider_evs_send_window 4
|
||||
select variable_type from information_schema.system_variables where variable_name = 'wsrep_provider_gcs_max_throttle';
|
||||
variable_type
|
||||
DOUBLE
|
||||
set global wsrep_provider_gcs_max_throttle = 1.1;
|
||||
ERROR 42000: Variable 'gcs_max_throttle' can't be set to the value of '1.100000'
|
||||
set global wsrep_provider_gcs_max_throttle = 0.5;
|
||||
show global variables like 'wsrep_provider_gcs_max_throttle';
|
||||
Variable_name Value
|
||||
wsrep_provider_gcs_max_throttle 0.500000
|
||||
set global wsrep_provider_gcs_max_throttle = default;
|
||||
show global variables like 'wsrep_provider_gcs_max_throttle';
|
||||
Variable_name Value
|
||||
wsrep_provider_gcs_max_throttle 0.250000
|
||||
select variable_type from information_schema.system_variables where variable_name = 'wsrep_provider_cert_log_conflicts';
|
||||
variable_type
|
||||
BOOLEAN
|
||||
set global wsrep_provider_cert_log_conflicts = on;
|
||||
show global variables like 'wsrep_provider_cert_log_conflicts';
|
||||
Variable_name Value
|
||||
wsrep_provider_cert_log_conflicts ON
|
||||
set global wsrep_provider_cert_log_conflicts = off;
|
||||
show global variables like 'wsrep_provider_cert_log_conflicts';
|
||||
Variable_name Value
|
||||
wsrep_provider_cert_log_conflicts OFF
|
||||
set global wsrep_provider_cert_log_conflicts = default;
|
||||
show global variables like 'wsrep_provider_cert_log_conflicts';
|
||||
Variable_name Value
|
||||
wsrep_provider_cert_log_conflicts OFF
|
||||
select read_only from information_schema.system_variables where variable_name = 'wsrep_provider_evs_auto_evict';
|
||||
read_only
|
||||
YES
|
||||
set global wsrep_provider_evs_auto_evict = on;
|
||||
ERROR HY000: Variable 'wsrep_provider_evs_auto_evict' is a read only variable
|
||||
set global wsrep_provider_gcs_fc_master_slave = default;
|
||||
Warnings:
|
||||
Warning 1287 '@@wsrep_provider_gcs_fc_master_slave' is deprecated and will be removed in a future release
|
||||
call mtr.add_suppression("error setting param");
|
||||
call mtr.add_suppression("Unknown parameter");
|
||||
call mtr.add_suppression("Setting parameter");
|
Reference in New Issue
Block a user