summaryrefslogtreecommitdiffstats
path: root/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/all_vars.test
blob: 7943d3e4c0bdbab7364d78f107cdfe22e1177038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--source include/have_rocksdb.inc
--source include/not_embedded.inc

# This test verifies that *all* MyRocks system variables are tested by the
# rocksdb_sys_vars suite. For every MyRocks system variable there must be a
# <variable_name>_basic.test file.
#

#
# we can diff in perl or in sql, as it's my_SQL_test suite, do it in sql
#

perl;
  use File::Basename;
  my $dirname=dirname($ENV{MYSQLTEST_FILE});
  my @all_tests=<$dirname/*_basic{,_32,_64}.test>;
  open(F, '>', "$ENV{MYSQLTEST_VARDIR}/tmp/rocksdb_sys_vars.all_vars.txt") or die;
  binmode F;
  print F join "\n", sort map { s/_basic(_32|_64)?\.test$//; basename $_ } @all_tests;
EOF

create table t1 (test_name text) engine=MyISAM;
create table t2 (variable_name text) engine=MyISAM;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval load data infile "$MYSQLTEST_VARDIR/tmp/rocksdb_sys_vars.all_vars.txt" into table t1;

insert into t2 select variable_name from information_schema.global_variables where variable_name like "rocksdb_%";
insert into t2 select variable_name from information_schema.session_variables where variable_name like "rocksdb_%";

--sorted_result
select variable_name as `There should be *no* long test name listed below:` from t2
  where length(variable_name) > 50;

--sorted_result
select variable_name as `There should be *no* variables listed below:` from t2
  left join t1 on variable_name=test_name where test_name is null ORDER BY variable_name;

drop table t1;
drop table t2;