MDEV-18855 Mariabackup should fetch innodb_compression_level from running server

- Fetch innodb_compression_level from the running server.Add the value
of innodb_compression_level in backup-my.cnf file during backup phase.
So that prepare can use the innodb_compression_level variable from
backup-my.cnf
This commit is contained in:
Thirunarayanan Balathandayuthapani 2019-03-08 16:00:08 +05:30
commit d038806dfe
4 changed files with 68 additions and 3 deletions

View file

@ -0,0 +1,14 @@
set global innodb_compression_level = 3;
CREATE TABLE t1(c1 INT, b CHAR(20)) ENGINE=INNODB PAGE_COMPRESSED=1;
INSERT INTO t1 VALUES(1, 'mariadb');
# xtrabackup backup
# xtrabackup prepare
FOUND /innodb_compression_level=3/ in backup-my.cnf
DELETE FROM t1;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
c1 b
1 mariadb
DROP TABLE t1;
set global innodb_compression_level = default;