mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 10:56:12 +01:00 
			
		
		
		
	 0c55d854fe
			
		
	
	
	0c55d854fe
	
	
	
		
			
			Problem: ======== mariabackup --prepare fails to write the pages in encrypted format. This issue happens only for default encrypted table when innodb_encrypt_tables variable is enabled. Fix: ==== backup process should write the value of innodb_encrypt_tables variable in configuration file. prepare should enable the variable based on configuration file.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			909 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			909 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| --source include/have_file_key_management.inc
 | |
| --source include/have_innodb.inc
 | |
| 
 | |
| CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB;
 | |
| insert into t1 values(repeat('a',100));
 | |
| 
 | |
| select @@innodb_encrypt_tables;
 | |
| echo # xtrabackup backup;
 | |
| let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
 | |
| 
 | |
| --disable_result_log
 | |
| exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
 | |
| --enable_result_log
 | |
| --source include/shutdown_mysqld.inc
 | |
| 
 | |
| echo # xtrabackup prepare export;
 | |
| --disable_result_log
 | |
| exec $XTRABACKUP --prepare --export --target-dir=$targetdir;
 | |
| --enable_result_log
 | |
| 
 | |
| --source include/start_mysqld.inc
 | |
| let MYSQLD_DATADIR=`select @@datadir`;
 | |
| ALTER TABLE t1 DISCARD TABLESPACE;
 | |
| copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
 | |
| copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
 | |
| ALTER TABLE t1 IMPORT TABLESPACE;
 | |
| CHECK TABLE t1;
 | |
| DROP TABLE t1;
 | |
| rmdir $targetdir;
 |