summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2019-07-01 15:21:17 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2019-07-01 15:21:17 +0530
commit85d0a1955fe9b9cf87fb6cbfe84d684bff2b24cc (patch)
tree4f9c56c474bb0824b0581025929e07bde49bd920
parented6da51f3e69430e0bdd6c2e839fd4d0dada0ba1 (diff)
downloadmariadb-git-85d0a1955fe9b9cf87fb6cbfe84d684bff2b24cc.tar.gz
MDEV-19914 Server startup fails while dropping garbage encrypted tablespace if innodb_encryption_threads > 0
- Avoiding accessing encryption thread mutex before initiating the encryption threads
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test1
-rw-r--r--storage/innobase/fil/fil0crypt.cc3
2 files changed, 3 insertions, 1 deletions
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;
}