Debian Codegraph @

mysql-test/suite/encryption/t/file_creation.test

raw
1 --source include/have_innodb.inc
2 --source include/have_example_key_management_plugin.inc
3 let $restart_noprint=2;
4 # embedded does not support restart
5 -- source include/not_embedded.inc
6
7 #
8 # MDEV-19348 MariaBackup prepare fails with InnoDB: Database page corruption
9 # on disk or a failed file read
10 #
11
12 SET GLOBAL innodb_encrypt_tables = ON;
13 SET GLOBAL innodb_encryption_threads = 1;
14 SET GLOBAL innodb_max_dirty_pages_pct = 99;
15 SHOW VARIABLES LIKE 'innodb_encrypt%';
16
17 CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(255), f3 CHAR(255),
18 f4 CHAR(255), f5 CHAR(255))ENGINE=INNODB;
19
20 INSERT INTO t1 VALUES(1, "mysql", "mariadb", "batman", "superman");
21 INSERT INTO t1 SELECT * FROM t1;
22 INSERT INTO t1 SELECT * FROM t1;
23 INSERT INTO t1 SELECT * FROM t1;
24 INSERT INTO t1 SELECT * FROM t1;
25
26 --let $tables_count= `select count(*) + 1 from information_schema.tables where engine = 'InnoDB'`
27
28 --echo # Wait max 10 min for key encryption threads to encrypt all spaces
29 --let $wait_timeout= 600
30 --let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
31 --source include/wait_condition.inc
32
33 OPTIMIZE TABLE t1;
34
35 --source ../../suite/innodb/include/no_checkpoint_start.inc
36 ALTER TABLE t1 FORCE;
37 --let CLEANUP_IF_CHECKPOINT=DROP TABLE t1;
38 --source ../../suite/innodb/include/no_checkpoint_end.inc
39
40 --source include/start_mysqld.inc
41 DROP TABLE t1;