1call mtr.add_suppression("\\[ERROR\\] Function 'keyring_file' already exists");
2call mtr.add_suppression("\\[ERROR\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.*'.");
3call mtr.add_suppression("Plugin keyring_file reported");
4# restart:<hidden args>
5CREATE TABLE t1(id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, credit_card VARCHAR(200), private VARCHAR(50)) ENGINE=InnoDB ENCRYPTION='y';
6SET DEBUG_SYNC= 'row_merge_after_scan SIGNAL opened WAIT_FOR rotated';
7ALTER TABLE t1 ADD INDEX secret (credit_card), ALGORITHM=INPLACE, LOCK=NONE;
8SET DEBUG_SYNC= 'now WAIT_FOR opened';
9ALTER INSTANCE ROTATE INNODB MASTER KEY;
10SET DEBUG_SYNC= 'now SIGNAL rotated';
11CREATE TABLE t2(id int) ENGINE=InnoDB;
12SET DEBUG_SYNC= 'row_merge_after_scan SIGNAL opened WAIT_FOR updated';
13ALTER TABLE t1 ADD INDEX secret2 (private), ALGORITHM=INPLACE, LOCK=NONE;
14SET DEBUG_SYNC= 'now WAIT_FOR opened';
15INSERT INTO t1(credit_card) SELECT credit_card FROM t1;
16INSERT INTO t1(credit_card) SELECT credit_card FROM t1;
17INSERT INTO t1(credit_card) SELECT credit_card FROM t1;
18SET DEBUG_SYNC= 'now SIGNAL updated';
19DROP TABLE t2;
20SELECT variable_value > 0 FROM performance_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
21variable_value > 0
221
23SELECT variable_value > 0 FROM performance_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted';
24variable_value > 0
251
26SELECT variable_value > 0 FROM performance_schema.global_status WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted';
27variable_value > 0
281
29SELECT variable_value > 0 FROM performance_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted';
30variable_value > 0
311
32SELECT variable_value > 0 FROM performance_schema.global_status WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted';
33variable_value > 0
341
35DROP TABLE t1;
36SET DEBUG_SYNC= 'RESET';
37CREATE TABLE t (a INT, b TEXT) ENGINE=InnoDB ENCRYPTION='y';
38SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL paused WAIT_FOR unpause';
39ALTER TABLE t ADD PRIMARY KEY (a);
40SET DEBUG_SYNC= 'now WAIT_FOR paused';
41SET DEBUG_SYNC= 'now SIGNAL unpause';
42DROP TABLE t;
43SET DEBUG_SYNC= 'RESET';
44