Debian Codegraph @

mysql-test/suite/encryption/t/innodb-read-only.test

raw
1 --source suite/encryption/include/have_file_key_management_plugin.inc
2 --source include/have_innodb.inc
3 --source include/not_embedded.inc
4
5 --echo # Wait max 10 min for key encryption threads to encrypt all spaces
6 let $cnt=600;
7 while ($cnt)
8 {
9 let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
10 if ($success)
11 {
12 let $cnt=0;
13 }
14 if (!$success)
15 {
16 real_sleep 1;
17 dec $cnt;
18 }
19 }
20 if (!$success)
21 {
22 SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
23 SHOW STATUS LIKE 'innodb_encryption%';
24 -- die Timeout waiting for encryption threads
25 }
26 --echo # Success!
27
28 # Server in normal mode
29 SET GLOBAL innodb_encryption_threads=4;
30 SET @encryption_threads_running=4;
31 --error 0,ER_NO_SUCH_TABLE
32 SELECT COUNT(*) INTO @encrypt_threads_running
33 FROM performance_schema.threads
34 WHERE NAME LIKE '%encrypt%';
35 SELECT @encryption_threads_running;
36
37 #
38 # MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on
39 # restarting server with encryption and read-only
40 #
41 --let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1
42 --source include/restart_mysqld.inc
43
44 # Server read-only mode
45 SET GLOBAL innodb_encryption_threads=4;
46 SET @encryption_threads_running=0;
47 --error 0,ER_NO_SUCH_TABLE
48 SELECT COUNT(*) INTO @encryption_threads_running
49 FROM performance_schema.threads
50 WHERE NAME LIKE '%encrypt%';
51 SELECT @encryption_threads_running;
52 --echo # All done