mirror of
https://github.com/MariaDB/server.git
synced 2025-11-08 00:28:29 +03:00
Modified srv_start to call fil_crypt_threads_init() only when srv_read_only_mode is not set. Modified encryption.innodb-read-only to capture number of encryption threads created for both scenarios when server is not read only as well as when server is read only.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
--source suite/encryption/include/have_file_key_management_plugin.inc
|
|
--source include/have_innodb.inc
|
|
--source include/not_embedded.inc
|
|
|
|
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
|
|
let $cnt=600;
|
|
while ($cnt)
|
|
{
|
|
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
|
|
if ($success)
|
|
{
|
|
let $cnt=0;
|
|
}
|
|
if (!$success)
|
|
{
|
|
real_sleep 1;
|
|
dec $cnt;
|
|
}
|
|
}
|
|
if (!$success)
|
|
{
|
|
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
SHOW STATUS LIKE 'innodb_encryption%';
|
|
-- die Timeout waiting for encryption threads
|
|
}
|
|
--echo # Success!
|
|
|
|
# Server in normal mode
|
|
SET GLOBAL innodb_encryption_threads=4;
|
|
SELECT COUNT(*) AS encrypt_threads_running
|
|
FROM performance_schema.threads
|
|
WHERE NAME LIKE '%encrypt%';
|
|
|
|
#
|
|
# MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on
|
|
# restarting server with encryption and read-only
|
|
#
|
|
--let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1
|
|
--source include/restart_mysqld.inc
|
|
|
|
# Server read-only mode
|
|
SET GLOBAL innodb_encryption_threads=4;
|
|
SELECT COUNT(*) AS encrypt_threads_running
|
|
FROM performance_schema.threads
|
|
WHERE NAME LIKE '%encrypt%';
|
|
--echo # All done
|