[MDEV-12709] mariabackup mtr tests don't handle properly option --mysqld='--innodb_data_file_path...' Created: 2017-05-06  Updated: 2017-07-28  Resolved: 2017-07-28

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.1.23
Fix Version/s: 10.1.25

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-12711 backup may show corruption with custo... Closed
blocks MDEV-12966 mariabackup fails with non-default in... Closed
blocks MDEV-12975 InnoDB redo log minimum size check us... Closed
Sprint: 10.1.24

 Description   

It is not possible to test custom values of innodb_data_file_path for mariabackup in current mtr , e.g. if I start:

./mtr full_backup -mysqld='-innodb_data_file_path=ibdata1:10M;ibdata2:10M:autoextend'

the test failure is caused by incorrect option detected by mariabackup:

CURRENT_TEST: mariabackup.full_backup
mysqltest: At line 7: exec of '/home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/bin/mariabackup --defaults-file=/home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/mysql-test/var/my.cnf --backup --target-dir=/home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/mysql-test/var/tmp/backup 2>&1' failed, error: 256, status: 1, errno: 0
Output from before failure:
170506 08:32:26 Connecting to MySQL server host: localhost, user: root, password: set, port: 16000, socket: /home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/mysql-test/var/tmp/mysqld.1.sock
Using server version 10.1.23-MariaDB
/home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/bin/mariabackup based on MariaDB server 10.1.23-MariaDB Linux (x86_64) 
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /home/a/test1/mariadb-environs/_depot/m-tar/10.1.23/mysql-test/var/mysqld.1/data/
xtrabackup: open files limit requested 1024, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = ./
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 5242880
170506 08:32:26 >> log scanned up to (1632961)
InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
xtrabackup: Could not open or create data files.
xtrabackup: If you tried to add new data files, and it failed here,
xtrabackup: you should now edit innodb_data_file_path in my.cnf back
xtrabackup: to what it was, and remove the new ibdata files InnoDB created
xtrabackup: in this failed attempt. InnoDB only wrote those files full of
xtrabackup: zeros, but did not yet use them in any way. But be careful: do not
xtrabackup: remove old data files which contain your precious data!
xtrabackup: error: xb_load_tablespaces() failed witherror code 11

So this line is incorrectly detected:
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
and results in:
InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!



 Comments   
Comment by Andrii Nikitin (Inactive) [ 2017-06-01 ]

The same should be fixed for innodb_log_file_size.
Alternatively, mariabackup could read actual configuration from the running mysqld, not from my.cnf - will that be a solution?

currently following error occurs:

$ ./mtr --mysqld=--innodb-page-size=32k --mysqld=--innodb-buffer-pool-size=24m --mysqld=--innodb-log-file-size=10m full_backup
...
InnoDB: Error: log file ./ib_logfile0 is of different size 10485760 bytes
InnoDB: than specified in the .cnf file 5242880 bytes!

Generated at Thu Feb 08 07:59:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.