diff --git a/mysql-test/r/all_persisted_variables.result b/mysql-test/r/all_persisted_variables.result index 9984a2831a7..0fc89039c02 100644 --- a/mysql-test/r/all_persisted_variables.result +++ b/mysql-test/r/all_persisted_variables.result @@ -38,11 +38,11 @@ WHERE variable_name NOT IN AND variable_name NOT LIKE 'ndb_%' ORDER BY variable_name; -include/assert.inc ['Expect 554 variables in the table. Due to open Bugs, we are checking for 547'] +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 358 persisted variables in the table. Due to open Bugs, we are checking for 353'] +include/assert.inc ['Expect 359 persisted variables in the table. Due to open Bugs, we are checking for 354'] ************************************************************ * 3. Restart server, it must preserve the persisted variable @@ -50,9 +50,9 @@ include/assert.inc ['Expect 358 persisted variables in the table. Due to open Bu ************************************************************ # restart -include/assert.inc ['Expect 353 persisted variables in persisted_variables table.'] -include/assert.inc ['Expect 353 persisted variables shown as PERSISTED in variables_info table.'] -include/assert.inc ['Expect 353 persisted variables with matching peristed and global values.'] +include/assert.inc ['Expect 354 persisted variables in persisted_variables table.'] +include/assert.inc ['Expect 354 persisted variables shown as PERSISTED in variables_info table.'] +include/assert.inc ['Expect 354 persisted variables with matching peristed and global values.'] ************************************************************ * 4. Test RESET PERSIST IF EXISTS. Verify persisted variable diff --git a/mysql-test/t/all_persisted_variables.test b/mysql-test/t/all_persisted_variables.test index f5e98fa1a2b..c1309dfcd67 100644 --- a/mysql-test/t/all_persisted_variables.test +++ b/mysql-test/t/all_persisted_variables.test @@ -40,6 +40,8 @@ let $total_global_vars=`SELECT COUNT(*) FROM performance_schema.global_variables where variable_name NOT LIKE 'ndb_%'`; let $total_persistent_vars=359; +# Due to open bugs, there are fewer variables +--let $total_persistent_vars_sans_bugs=`SELECT $total_persistent_vars - 5;` --echo *************************************************************** --echo * 0. Verify that variables present in performance_schema.global @@ -124,10 +126,14 @@ WHERE variable_name NOT IN AND variable_name NOT LIKE 'ndb_%' ORDER BY variable_name; +# Due to open bugs, there are fewer vars to check than total +--let $bug_var_count=7 +--let $check_count_vars=`SELECT $total_global_vars - $bug_var_count;` + --let $count_vars= `SELECT COUNT(*) FROM all_vars;` --echo ---let $assert_text= 'Expect 554 variables in the table. Due to open Bugs, we are checking for 547' ---let $assert_cond= [SELECT COUNT(*) as count FROM all_vars, count, 1] = $total_global_vars-7 +--let $assert_text= 'Expect 500+ variables in the table. Due to open Bugs, we are checking for fewer' +--let $assert_cond= [SELECT COUNT(*) as count FROM all_vars, count, 1] = $check_count_vars --source include/assert.inc --echo @@ -152,7 +158,7 @@ SET PERSIST innodb_monitor_reset_all="latch"; --enable_warnings --enable_query_log --echo ---let $assert_text= 'Expect 358 persisted variables in the table. Due to open Bugs, we are checking for 353' +--let $assert_text= 'Expect $total_persistent_vars persisted variables in the table. Due to open Bugs, we are checking for $total_persistent_vars_sans_bugs' # Below are the persisted variables we are unable to test at the moment due to # existing Bugs. @@ -161,7 +167,7 @@ SET PERSIST innodb_monitor_reset_all="latch"; # 3. innodb_ft_aux_table (Bug#27512616) # 4. innodb_ft_user_stopword_table (Bug#27512616) # 5. innodb_ft_server_stopword_table (Bug#27512616) ---let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.persisted_variables, count, 1] = $total_persistent_vars-5 +--let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.persisted_variables, count, 1] = $total_persistent_vars_sans_bugs --source include/assert.inc --echo @@ -174,16 +180,16 @@ SET PERSIST innodb_monitor_reset_all="latch"; --source include/wait_until_connected_again.inc --echo ---let $assert_text= 'Expect 353 persisted variables in persisted_variables table.' ---let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.persisted_variables, count, 1] = $total_persistent_vars-5 +--let $assert_text= 'Expect $total_persistent_vars_sans_bugs persisted variables in persisted_variables table.' +--let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.persisted_variables, count, 1] = $total_persistent_vars_sans_bugs --source include/assert.inc ---let $assert_text= 'Expect 353 persisted variables shown as PERSISTED in variables_info table.' ---let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.variables_info WHERE variable_source="PERSISTED", count, 1] = $total_persistent_vars-5 +--let $assert_text= 'Expect $total_persistent_vars_sans_bugs persisted variables shown as PERSISTED in variables_info table.' +--let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.variables_info WHERE variable_source="PERSISTED", count, 1] = $total_persistent_vars_sans_bugs --source include/assert.inc - --let $assert_text= 'Expect 353 persisted variables with matching peristed and global values.' - --let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.variables_info vi JOIN performance_schema.persisted_variables pv JOIN performance_schema.global_variables gv ON vi.variable_name=pv.variable_name AND vi.variable_name=gv.variable_name AND pv.variable_value=gv.variable_value WHERE vi.variable_source="PERSISTED", count, 1] = $total_persistent_vars-5 + --let $assert_text= 'Expect $total_persistent_vars_sans_bugs persisted variables with matching peristed and global values.' + --let $assert_cond= [SELECT COUNT(*) as count FROM performance_schema.variables_info vi JOIN performance_schema.persisted_variables pv JOIN performance_schema.global_variables gv ON vi.variable_name=pv.variable_name AND vi.variable_name=gv.variable_name AND pv.variable_value=gv.variable_value WHERE vi.variable_source="PERSISTED", count, 1] = $total_persistent_vars_sans_bugs --source include/assert.inc --echo