diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-07-01 18:50:44 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2019-07-01 18:50:44 +0530 |
commit | dca9792a24b78fa07d3ce72b7a39e7f765c50b41 (patch) | |
tree | df08bf96cc658813dd9cda4ddbf78d92ee2dba07 | |
parent | 5a136d84f35f9863c2344772f107be22c8aaa05a (diff) | |
download | mariadb-git-dca9792a24b78fa07d3ce72b7a39e7f765c50b41.tar.gz |
MDEV-17228 Encrypted temporary tables are not encrypted
- log_crypt_init() should be called from create_log_files(). Because
it should re-create the new random nonce compared to the old ones.
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 99a8f41698e..86a56b42add 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -491,6 +491,9 @@ create_log_files( /* Create a log checkpoint. */ log_mutex_enter(); + if (log_sys->is_encrypted() && !log_crypt_init()) { + return DB_ERROR; + } ut_d(recv_no_log_write = false); log_sys->lsn = ut_uint64_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE); @@ -1920,8 +1923,7 @@ innobase_start_or_create_for_mysql() srv_log_file_size_requested = srv_log_file_size; - if ((srv_encrypt_log || innodb_encrypt_temporary_tables) - && !log_crypt_init()) { + if (innodb_encrypt_temporary_tables && !log_crypt_init()) { return srv_init_abort(DB_ERROR); } |