*********************************************************************** * Run only on debug build,non-windows as few server variables are not * available on all platforms. *********************************************************************** call mtr.add_suppression("Failed to set up SSL because of the following SSL library error"); *************************************************************** * 0. Verify that variables present in performance_schema.global * variables are actually global variables and can be set using * SET GLOBAL *************************************************************** CREATE TABLE global_vars (id INT PRIMARY KEY AUTO_INCREMENT, var_name VARCHAR(64), var_value VARCHAR(1024)); INSERT INTO global_vars (var_name, var_value) SELECT * FROM performance_schema.global_variables WHERE variable_name NOT IN ('innodb_monitor_enable', 'innodb_monitor_disable', 'innodb_monitor_reset', 'innodb_monitor_reset_all', 'proxy_ip_list', 'rbr_exec_mode') AND variable_name NOT LIKE 'xengine_%'; ************************************************************ * 1. Check that there are no persisted variable settings. ************************************************************ include/assert.inc ['Expect 0 persisted variables.'] ************************************************************ * 2. Initialization. Test SET PERSIST. Verify persisted * variables. ************************************************************ CREATE TABLE all_vars (id INT PRIMARY KEY AUTO_INCREMENT, var_name VARCHAR(64), var_value VARCHAR(1024)); INSERT INTO all_vars (var_name, var_value) SELECT * FROM performance_schema.global_variables WHERE variable_name NOT IN ('rbr_exec_mode', 'proxy_ip_list') AND variable_name NOT LIKE 'ndb_%' AND variable_name NOT LIKE 'xengine_%' ORDER BY variable_name; include/assert.inc [Expect 500+ variables in the table. Due to open Bugs, we are checking for fewer ] # Test SET PERSIST include/assert.inc [Expect 519 persisted variables in the table.] ************************************************************ * 3. Restart server, it must preserve the persisted variable * settings. Verify persisted configuration. ************************************************************ # restart include/assert.inc [Expect 519 persisted variables in persisted_variables table.] include/assert.inc [Expect 519 persisted variables shown as PERSISTED in variables_info table.] include/assert.inc [Expect 519 persisted variables with matching peristed and global values.] ************************************************************ * 4. Test RESET PERSIST IF EXISTS. Verify persisted variable * settings are removed. ************************************************************ include/assert.inc ['Expect 0 persisted variables.'] ************************************************************ * 5. Clean up. ************************************************************ DROP TABLE all_vars; DROP TABLE global_vars; # restart