| 1 |
--source include/not_threadpool.inc |
| 2 |
|
| 3 |
# 2010-01-28 OBN Added support to load 'innodb' and 'semisync' if possible. |
| 4 |
# As we need to have there variables loaded if the components exist but do |
| 5 |
# not want the test skiped if they are not, we cannot use the 'have_xxx' mecanizm. |
| 6 |
# Added an 'all_vars-master.opt' file that includes |
| 7 |
# "$SEMISYNC_PLUGIN_OPT --loose-innodb" (see $SEMISYNC_PLUGIN_OPT setting in mysql-test-run.pl) |
| 8 |
# and logic similar to 'include/have_semisync_plugin.inc' that will load semisync plugin |
| 9 |
if (`SELECT @@have_dynamic_loading = 'YES' AND LENGTH('$SEMISYNC_SOURCE_PLUGIN') > 0`) |
| 10 |
{ |
| 11 |
--disable_query_log |
| 12 |
# The following is to prevent a mis-match on windows that has the name of of the lib ending with 'dll' |
| 13 |
--replace_regex /\.dll/.so/ |
| 14 |
eval INSTALL PLUGIN rpl_semi_sync_source SONAME '$SEMISYNC_SOURCE_PLUGIN'; |
| 15 |
--replace_regex /\.dll/.so/ |
| 16 |
eval INSTALL PLUGIN rpl_semi_sync_replica SONAME '$SEMISYNC_REPLICA_PLUGIN'; |
| 17 |
--enable_query_log |
| 18 |
} |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
# |
| 23 |
# This test verifies that *all* system variables are tested |
| 24 |
# by the sys_vars suite. For every system variable |
| 25 |
# there must be a <variable_name>_basic.test file. |
| 26 |
# |
| 27 |
|
| 28 |
# |
| 29 |
# we can diff in perl or in sql, as it's my_SQL_test suite, do it in sql |
| 30 |
# |
| 31 |
|
| 32 |
perl; |
| 33 |
use File::Basename; |
| 34 |
my $dirname=dirname($ENV{MYSQLTEST_FILE}); |
| 35 |
my @all_tests=<$dirname/*_basic{,_32,_64}.test>; |
| 36 |
open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/sys_vars.all_vars.txt") or die; |
| 37 |
binmode F; |
| 38 |
print F join "\n", sort map { s/_basic(_32|_64)?\.test$//; basename $_ } @all_tests; |
| 39 |
EOF |
| 40 |
|
| 41 |
# |
| 42 |
# todo: fix Bug #55080 mysql-next-mr requires a specic to new added global variables test file |
| 43 |
# to get rid of unxpected and probited following SELECT results |
| 44 |
# |
| 45 |
|
| 46 |
create table t1 (test_name text); |
| 47 |
create table t2 (variable_name text); |
| 48 |
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
| 49 |
eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1; |
| 50 |
|
| 51 |
--disable_warnings |
| 52 |
insert into t2 select variable_name from performance_schema.global_variables; |
| 53 |
insert into t2 select variable_name from performance_schema.session_variables; |
| 54 |
--enable_warnings |
| 55 |
|
| 56 |
# Performance schema variables are too long for files named |
| 57 |
# 'mysql-test/suite/sys_vars/t/' ... |
| 58 |
# ... 'performance_schema_events_waits_history_long_size_basic-master.opt' |
| 59 |
# to fit in the tar source distribution (limit in old tar) |
| 60 |
# Renaming the tests to aliases below. |
| 61 |
|
| 62 |
update t2 set variable_name= replace(variable_name, "performance_schema_", "pfs_"); |
| 63 |
update t2 set variable_name= replace(variable_name, "_history_long_", "_hl_"); |
| 64 |
update t2 set variable_name= replace(variable_name, "_history_", "_h_"); |
| 65 |
update t2 set variable_name= replace(variable_name, "_throttle_queries_not_using_indexes", "_throttle_qni"); |
| 66 |
update t2 set variable_name= replace(variable_name, "lock_order_", "lo_"); |
| 67 |
|
| 68 |
--sorted_result |
| 69 |
select variable_name as `There should be *no* long test name listed below:` from t2 |
| 70 |
where length(variable_name) > 50; |
| 71 |
|
| 72 |
--sorted_result |
| 73 |
select variable_name as `There should be *no* variables listed below:` from t2 |
| 74 |
left join t1 on variable_name=test_name where test_name is null ORDER BY variable_name; |
| 75 |
|
| 76 |
drop table t1; |
| 77 |
drop table t2; |
| 78 |
|
| 79 |
# Unloading the semisync plugins in case they were loaded |
| 80 |
if (`SELECT @@have_dynamic_loading = 'YES' AND LENGTH('$SEMISYNC_SOURCE_PLUGIN') > 0`) |
| 81 |
{ |
| 82 |
--disable_query_log |
| 83 |
UNINSTALL PLUGIN rpl_semi_sync_source; |
| 84 |
UNINSTALL PLUGIN rpl_semi_sync_replica; |
| 85 |
--enable_query_log |
| 86 |
} |
| 87 |
|
| 88 |
# Cleanup |
| 89 |
--remove_file $MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt |