MySQLConfig parses and encapsulates system variables and values from SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults. A MySQLConfig object represents how MySQL is or would be configured given one of those inputs. If the input is SHOW VARIABLES, then the config is acive, i.e. MySQL’s running config. All other inputs are inactive, i.e. how MySQL should or would be running if started with the config.
Inactive configs are made to mimic SHOW VARIABLES so that MySQLConfig objects can be reliably compared with MySQLConfigComparer. This is necessary because the inputs are different in how they list values, how they treat variables with optional values, etc.
Only variables present in the input are saved in the MySQLConfig object. So if has() returns false, then the variable did not appear in the input.
MySQLConfig | MySQLConfig parses and encapsulates system variables and values from SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults. |
Variables | |
%can_be_duplicate | |
Functions | |
new | |
_parse_config | |
_parse_config_output | |
detect_config_output_format | |
parse_show_variables | |
parse_mysqld | |
parse_my_print_defaults | |
parse_option_file | |
_parse_varvals | |
_mimic_show_variables | Make the variables’ values mimic SHOW VARIABLES. |
_slurp_file | |
_get_version | |
has | |
value_of | |
variables | |
duplicate_variables | |
option_files | |
mysql_version | |
format | |
is_active | |
_d |
sub new
%args | Arguments |
file | Filename of an option file, or containing output of mysqld --help --verbose, my_print_defaults or SHOW VARIABLES |
output | Text output of one of ^ if you want to slurp the file manually |
result_set | Arrayref of SHOW VARIABLES |
dbh | dbh to get SHOW VARIABLES from |
TextResultSetParser | TextResultSetParser object if file or output arg is given |
MySQLConfig object
sub _mimic_show_variables
Make the variables’ values mimic SHOW VARIABLES. Different output formats list values differently. To make comparisons easier, outputs are made to mimic SHOW VARIABLES.
%args | Arguments |
vars | Hashref of variables-values |
format | Config output format (mysqld, option_file, etc.) |
my %can_be_duplicate
sub new
sub _parse_config
sub _parse_config_output
sub detect_config_output_format
sub parse_show_variables
sub parse_mysqld
sub parse_my_print_defaults
sub parse_option_file
sub _parse_varvals
Make the variables’ values mimic SHOW VARIABLES.
sub _mimic_show_variables
sub _slurp_file
sub _get_version
sub has
sub value_of
sub variables
sub duplicate_variables
sub option_files
sub mysql_version
sub format
sub is_active
sub _d