mariadb/mysql-test/suite
Julius Goryavsky 17e0f5224c MDEV-27524: Incorrect binlogs after Galera SST using rsync and mariabackup
This commit adds correct handling of binlogs for SST using rsync
or mariabackup. Before this fix, binlogs were handled incorrectly -
- only one (last) binary log file was transferred during SST, which
then led to various failures (for example, when trying to list all
events from the binary log). These bugs were long masked by flaws
in the primitive binlogs handling code in the SST scripts, which
causing binary logs files to be erased after transfer or not added
to the binlog index on the joiner node. Now the correct transfer
of all binary logs (not just the last of the binary log files) has
been implemented both for the rsync (at the script level) and for
the mariabackup (at the level of the main utility code).

This commit also adds a new sst_max_binlogs=<n> parameter, which
can be located in the [sst] section or in the [xtrabackup] section
(historically, supported for mariabackup only, not for rsync), or
in one of the server sections. This parameter specifies the number
of binary log files to be sent to the joiner node during SST. This
option is added for compatibility with old SST scripting behavior,
which can be emulated by setting the sst_max_binlogs=1 (although
in general this can cause problems for the reasons described above).
In addition, setting the sst_max_binlogs=0 can be used to suppress
the transmission of binary logs to the joiner nodes during SST
(although sometimes a single file with the current binary log can
still be transmitted to the joiner, even with sst_max_binlogs=0,
because this sometimes necessary in modes that involve the use of
GTIDs with Galera).

Also, this commit ensures correct handling of paths to various
innodb files and directories in the SST scripts, and fixes some
problems with this that existed in mariabackup utility (which
were associated with incorrect handling of the innodb_data_dir
parameter in some scenarios).

In addition, this commit contains the following enhancements:

 1) Added tests for mtr, which check the correct work with binlogs
    after SST (using rsync and mariabackup);
 2) Added correct handling of slashes at the end of all paths that
    the SST script receives as parameters;
 3) Improved parsing code for --mysqld-args parameters. Now it
    correctly processes the sequence "--" after the name of the
    one-letter option;
 4) Checking the secret signature during joiner authentication
    is made independent of presence of bash (as a unix shell)
    in the system and diff utility no longer needed to check
    certificates compliance;
 5) All directories that are necessary for the correct placement
    of various logs are automatically created by SST scripts in
    advance (before running mariabackup on the joiner node);
 6) Removal of old binary logs on joiner is done using the binlog
    index (if it exists) (not only by fixed pattern that based
    on the current binlog name, as before);
 7) Paths for placing binary logs are correctly processed if they
    are set as relative paths (to the datadir);
 8) SST scripts are made even more resistant to spaces in filenames
    (now for binlogs);
 9) In case of failure, SST scripts now always end with an exit
    code other than zero;
10) SST script for rsync now correctly create a tar file with
    the binlogs, even if the paths to them (in the binlog index
    file) are specified as a mix of absolute and relative paths,
    and even if they do not match with the datadir path specified
    in the current configuration settings.
2022-02-22 10:45:06 +01:00
..
archive Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
binlog MDEV-27536 incremental commit to correct regression test. 2022-01-27 13:44:39 +02:00
binlog_encryption Some tests can take very long time when run with valgrind 2021-07-24 21:32:52 +03:00
csv Merge 10.1 into 10.2 2017-05-22 09:46:51 +03:00
encryption MDEV-15208: server crashed, when using ORDER BY with window function and UNION 2022-02-22 06:38:40 +03:00
engines reenable tests from engines/funcs 2021-03-10 09:12:57 +01:00
federated test cases for MySQL bugs 2022-01-21 16:02:34 +01:00
funcs_1 Fixed result for embedded server 2022-01-28 16:31:53 +02:00
funcs_2 Merge 10.1 into 10.2 2020-07-01 12:03:55 +03:00
galera MDEV-27524: Incorrect binlogs after Galera SST using rsync and mariabackup 2022-02-22 10:45:06 +01:00
galera_3nodes MDEV-24097: galera[_3nodes] suite tests in MTR sporadically fails 2021-12-23 14:19:44 +01:00
gcol MDEV-26866 FOREIGN KEY…SET NULL corrupts an index on a virtual column 2021-10-28 07:32:27 +03:00
handler Merge branch '10.1' into 10.2 2019-03-15 21:00:41 +01:00
heap MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error 2020-04-01 11:34:32 +02:00
innodb MDEV-27877 considerably speed up innodb_force_recovery test 2022-02-17 18:25:32 +01:00
innodb_fts MDEV-27722 innodb_fts.innodb-fts-ddl fails with a wrong message on FreeBSD 2022-02-17 10:26:06 +02:00
innodb_gis Disable innodb_gis.rtree_compress2 2022-02-11 12:58:42 +02:00
innodb_zip MDEV-27634 innodb_zip tests failing on s390x 2022-02-16 17:03:02 +02:00
jp MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
json MDEV-13992 Implement JSON_MERGE_PATCH. 2019-05-17 11:53:58 +04:00
large_tests MDEV-11002 large_tests.rpl_slave_net_timeout fails due to connection logging 2017-06-21 21:07:20 +03:00
maria MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches 2022-01-28 21:36:33 +01:00
mariabackup MDEV-27534: mariabackup: missing line in the compress_qpress.result 2022-02-22 10:20:42 +01:00
mtr/t overlay support for mysql-test-run and mysqltest 2012-02-23 07:50:11 +01:00
mtr2 Fix for overlayed include files on Windows and a test case 2013-11-10 14:37:32 +04:00
multi_source MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown 2020-08-21 14:48:53 +03:00
optimizer_unfixed_bugs MDEV-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
parts MDEV-26870 --skip-symbolic-links does not disallow .isl file creation 2022-01-21 14:43:59 +02:00
percona MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown 2020-08-21 14:48:53 +03:00
perfschema MDEV-25325 built-in documentation for performance_schema tables 2021-09-07 08:45:19 +03:00
perfschema_stress Update FSF Address 2019-05-11 21:29:06 +03:00
plugins Bug#31374305 - FORMAT() NOT DISPLAYING WHOLE NUMBER SIDE CORRECTLY FOR ES_MX AND ES_ES LOCALES 2022-01-21 16:02:34 +01:00
roles MDEV-17964: Assertion `status == 0' failed in add_role_user_mapping_action 2021-10-15 19:19:36 +03:00
rpl MDEV-16091: Seconds_Behind_Master spikes to millions of seconds 2022-02-15 08:00:28 -07:00
storage_engine MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown 2020-08-21 14:48:53 +03:00
stress MDEV-22339 - Assertion `str_length < len' failed 2020-06-04 23:52:10 +02:00
sys_vars Fixed result for embedded server 2022-01-28 16:31:53 +02:00
unit MDEV-19129: Xcode compatibility update: mysql-test-run.pl: rename $opt_vs_config to $multiconfig to use with other cmake multiconfig generators 2021-10-21 16:48:00 +03:00
vcol test cases for MySQL bugs 2022-01-21 16:02:34 +01:00
wsrep MDEV-23328 Server hang due to Galera lock conflict resolution 2021-10-29 07:57:18 +03:00