1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-21 21:22:27 +03:00
Files
mariadb/mysql-test/suite/sys_vars/t/all_vars.test
Anel Husakovic c596ad734d MDEV-30269: Remove rpl_semi_sync_[slave,master] usage in code
- Description:
  - Before 10.3.8 semisync was a plugin that is built into the server with
    MDEV-13073,starting with commit cbc71485e2.
    There are still some usage of `rpl_semi_sync_master` in mtr.
Note:
  - To recognize the replica in the `dump_thread`, replica is creating
    local variable `rpl_semi_sync_slave` (the keyword of plugin) in
    function `request_transmit`, that is catched by primary in
    `is_semi_sync_slave()`. This is the user variable and as such not
    related to the obsolete plugin.

 - Found in `sys_vars.all_vars` and `rpl_semi_sync_wait_point` tests,
   usage of plugins `rpl_semi_sync_master`, `rpl_semi_sync_slave`.
   The former test is disabled by default (`sys_vars/disabled.def`)
   and marked as `obsolete`, however this patch will remove the queries.

- Add cosmetic fixes to semisync codebase

Reviewer: <brandon.nesterenko@mariadb.com>
Closes PR #2528, PR #2380
2023-03-23 13:39:46 +01:00

84 lines
2.5 KiB
Plaintext

--source include/not_embedded.inc
--source include/not_threadpool.inc
#
# load everything we want to include in the testing
#
--disable_query_log
--disable_result_log
--disable_abort_on_error
eval INSTALL PLUGIN archive SONAME "$HA_ARCHIVE_SO";
eval INSTALL PLUGIN blackhole SONAME "$HA_BLACKHOLE_SO";
eval INSTALL PLUGIN federated SONAME "$HA_FEDERATEDX_SO";
eval INSTALL PLUGIN oqgraph SONAME "$HA_OQGRAPH_SO";
eval INSTALL PLUGIN sphinx SONAME "$HA_SPHINX_SO";
eval INSTALL PLUGIN innodb SONAME "$HA_INNODB_SO";
--enable_abort_on_error
--enable_result_log
--enable_query_log
#
# This test verifies that *all* system variables are tested
# by the sys_vars suite. For every 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/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);
create table t2 (variable_name text);
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
insert into t2 select variable_name from information_schema.global_variables;
insert into t2 select variable_name from information_schema.session_variables;
# Performance schema variables are too long for files named
# 'mysql-test/suite/sys_vars/t/' ...
# ... 'performance_schema_events_waits_history_long_size_basic-master.opt'
# to fit in the tar source distribution (limit in old tar)
# Renaming the tests to aliases below.
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
--sorted_result
--lowercase_result
select distinct variable_name as `There should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
--sorted_result
--lowercase_result
select distinct 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;
drop table t1;
drop table t2;
--disable_query_log
--disable_result_log
--disable_abort_on_error
UNINSTALL PLUGIN archive;
UNINSTALL PLUGIN blackhole;
UNINSTALL PLUGIN federated;
UNINSTALL PLUGIN oqgraph;
UNINSTALL PLUGIN sphinx;
UNINSTALL PLUGIN innodb;
UNINSTALL PLUGIN rpl_semi_sync_master;
UNINSTALL PLUGIN rpl_semi_sync_slave;
--enable_abort_on_error
--enable_result_log
--enable_query_log