mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
9bdf35e90f
MDEV-21298: mariabackup doesn't read from the [mariadbd] and [mariadbd-X.Y] server option groups from configuration files MDEV-21301: mariabackup doesn't read [mariadb-backup] option group in configuration file All three issues require to change the same code, that is why their fixes are joined in one commit. The fix is in invoking load_defaults_or_exit() and handle_options() for backup-specific groups separately from client-server groups to let the last handle_options() call fail on unknown backup-specific options. The order of options procesing is the following: 1) Load server groups and process server options, ignore unknown options 2) Load client groups and process client options, ignore unknown options 3) Load backup groups and process client-server options, exit on unknown option 4) Process --mysqld-args command line options, ignore unknown options New global flag my_handle_options_init_variables was added to have ability to invoke handle_options() for the same allowed options set several times without re-initialising previously set option values. --password value destroying is moved from option processing callback to mariabackup's handle_options() function to have ability to invoke server's handle_options() several times for the same possible allowed options set. Galera invokes wsrep_sst_mariabackup.sh with mysqld command line options to configure mariabackup as close to the server as possible. It is not known what server options are supported by mariabackup when the script is invoked. That is why new mariabackup option "--mysqld-args" is added, all unknown options that follow this option will be silently ignored. wsrep_sst_mariabackup.sh was also changed to: - use "--mysqld-args" mariabackup option to pass mysqld options, - remove deprecated innobackupex mode, - remove unsupported mariabackup options: --encrypt --encrypt-key --rebuild-indexes --rebuild-threads
87 lines
2.4 KiB
Text
87 lines
2.4 KiB
Text
#--source include/innodb_page_size.inc
|
|
--source include/have_partition.inc
|
|
|
|
CREATE TABLE t1(a INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
|
|
CREATE TABLE t2(a INT) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (4), (5), (6);
|
|
|
|
CREATE TABLE p (
|
|
a int
|
|
) ENGINE=InnoDB
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION p2 VALUES LESS THAN (300),
|
|
PARTITION p3 VALUES LESS THAN (400));
|
|
|
|
INSERT INTO p VALUES (1), (101), (201), (301);
|
|
|
|
CREATE TABLE isam_t1(a INT) ENGINE=MyISAM;
|
|
INSERT INTO isam_t1 VALUES (1), (2), (3);
|
|
|
|
CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
|
|
INSERT INTO isam_t2 VALUES (4), (5), (6);
|
|
|
|
CREATE TABLE isam_p (
|
|
a int
|
|
) ENGINE=MyISAM
|
|
PARTITION BY RANGE (a)
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
PARTITION p1 VALUES LESS THAN (200),
|
|
PARTITION p2 VALUES LESS THAN (300),
|
|
PARTITION p3 VALUES LESS THAN (400));
|
|
|
|
INSERT INTO isam_p VALUES (1), (101), (201), (301);
|
|
|
|
let $targetdir=$MYSQLTEST_VARDIR/tmp;
|
|
|
|
--disable_result_log
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir/full;
|
|
--enable_result_log
|
|
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|
|
CREATE TABLE t2(a INT) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (40), (50), (60);
|
|
|
|
ALTER TABLE p DROP PARTITION p0;
|
|
ALTER TABLE p DROP PARTITION p1;
|
|
ALTER TABLE p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
|
|
ALTER TABLE p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
|
|
|
|
INSERT INTO p VALUES (401), (501);
|
|
|
|
|
|
DROP TABLE isam_t1;
|
|
DROP TABLE isam_t2;
|
|
CREATE TABLE isam_t2(a INT) ENGINE=MyISAM;
|
|
|
|
INSERT INTO isam_t2 VALUES (40), (50), (60);
|
|
|
|
ALTER TABLE isam_p DROP PARTITION p0;
|
|
ALTER TABLE isam_p DROP PARTITION p1;
|
|
ALTER TABLE isam_p ADD PARTITION (PARTITION p4 VALUES LESS THAN (500));
|
|
ALTER TABLE isam_p ADD PARTITION (PARTITION p5 VALUES LESS THAN (600));
|
|
|
|
INSERT INTO isam_p VALUES (401), (501);
|
|
|
|
--disable_result_log
|
|
exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --incremental --no-timestamp --incremental-basedir=$targetdir/full $targetdir/inc;
|
|
exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log $targetdir/full;
|
|
exec $INNOBACKUPEX --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log --incremental-dir=$targetdir/inc $targetdir/full;
|
|
|
|
let $targetdir=$targetdir/full;
|
|
-- source include/restart_and_restore.inc
|
|
--enable_result_log
|
|
|
|
SELECT * from p;
|
|
SELECT * from isam_p;
|
|
|
|
DROP TABLE isam_p;
|
|
DROP TABLE isam_t2;
|
|
DROP TABLE p;
|
|
DROP TABLE t2;
|
|
rmdir $MYSQLTEST_VARDIR/tmp/full;
|
|
rmdir $MYSQLTEST_VARDIR/tmp/inc;
|