SET GLOBAL innodb_file_per_table = ON; create table t1(a int not null primary key, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed ENCRYPTION='Y'; create table t2(a int not null primary key, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed ENCRYPTION='Y'; create table t3(a int not null primary key, c char(200), b blob, index(b(10))) engine=innodb ENCRYPTION='Y'; create table t4(a int not null primary key, c char(200), b blob, index(b(10))) engine=innodb ENCRYPTION='Y'; --source include/restart_mysqld.inc --source include/no_checkpoint_start.inc begin; --disable_query_log --let $i = 20 begin; while ($i) { eval insert into t1(a,c,b) values ($i, repeat('secret1',20), repeat('secret2',6000)); dec $i; } --enable_query_log insert into t2 select * from t1; insert into t3 select * from t1; insert into t4 select * from t1; commit; # If checkpoint happens we will skip this test. # If no checkpoint happens, InnoDB refuses to # start as used encryption key is not found. SET GLOBAL innodb_flush_log_at_trx_commit=1; begin; update t1 set c = repeat('secret3', 20); update t2 set c = repeat('secret4', 20); update t3 set c = repeat('secret4', 20); update t4 set c = repeat('secret4', 20); insert into t1 (a,c,b) values (21, repeat('secret5',20), repeat('secret6',6000)); insert into t2 (a,c,b) values (21, repeat('secret7',20), repeat('secret8',6000)); insert into t3 (a,c,b) values (21, repeat('secret9',20), repeat('secre10',6000)); insert into t4 (a,c,b) values (21, repeat('secre11',20), repeat('secre12',6000)); COMMIT; let $cleanup= drop table t1,t2,t3,t4; --let CLEANUP_IF_CHECKPOINT= $cleanup; --source include/no_checkpoint_end.inc --echo # restart --let $error_log=$MYSQLTEST_VARDIR/tmp/my_restart.err --error 1 --exec $MYSQLD_CMD --log-error=$error_log --echo # Restart mysqld --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --let $restart_parameters=restart:--early-plugin-load="keyring_file=$KEYRING_PLUGIN" --keyring-file-data=$MYSQLTEST_VARDIR/std_data/keys2.txt --source include/start_mysqld.inc #--remove_file $error_log drop table t1,t2,t3,t4;