diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index d9a0e4e95cd..2e18b15079b 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -123,6 +123,7 @@ SET DEBUG_SYNC = 'now WAIT_FOR done'; SET GLOBAL innodb_flush_log_at_trx_commit=1; COMMIT; +let $restart_parameters = --innodb_encryption_threads=2; --let $shutdown_timeout= 0 --source include/restart_mysqld.inc disconnect con1; diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index 635ed619df0..d1bfa8921e5 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -2414,7 +2414,8 @@ fil_space_crypt_close_tablespace( { fil_space_crypt_t* crypt_data = space->crypt_data; - if (!crypt_data || srv_n_fil_crypt_threads == 0) { + if (!crypt_data || srv_n_fil_crypt_threads == 0 + || !fil_crypt_threads_inited) { return; }