summaryrefslogtreecommitdiff
path: root/storage/innobase/srv
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-11 16:47:23 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-12 11:32:49 +0300
commit66a09bd6aba0f7b74492d198146bb8d47cdd9dbb (patch)
treee657de3adc503b0f1d2b920b4652e1ceb906e6ae /storage/innobase/srv
parent8ee4b414ae071b1c666b97bac1808bc67a260e78 (diff)
downloadmariadb-git-66a09bd6aba0f7b74492d198146bb8d47cdd9dbb.tar.gz
MDEV-13318 Crash recovery failure after the server is killed during innodb_encrypt_log startup
This fixes several InnoDB bugs related to innodb_encrypt_log and two Mariabackup --backup bugs. log_crypt(): Properly derive the initialization vector from the start LSN of each block. Add a debug assertion. log_crypt_init(): Note that the function should only be used when creating redo log files and that the information is persisted in the checkpoint pages. xtrabackup_copy_log(): Validate data_len. xtrabackup_backup_func(): Always use the chosen checkpoint buffer. log_group_write_buf(), log_write_up_to(): Only log_crypt() the redo log payload, not the padding bytes. innobase_start_or_create_for_mysql(): Do not invoke log_crypt_init() or initiate a redo log checkpoint. recv_find_max_checkpoint(): Return the contents of LOG_CHECKPOINT_NO to xtrabackup_backup_func() in log_sys->next_checkpoint_no.
Diffstat (limited to 'storage/innobase/srv')
-rw-r--r--storage/innobase/srv/srv0start.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 21c1343f5b3..66866c98e62 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -2223,14 +2223,6 @@ files_checked:
recv_sys->dblwr.pages.clear();
- if (err == DB_SUCCESS && !srv_read_only_mode) {
- log_mutex_enter();
- if (log_sys->is_encrypted() && !log_crypt_init()) {
- err = DB_ERROR;
- }
- log_mutex_exit();
- }
-
if (err == DB_SUCCESS) {
/* Initialize the change buffer. */
err = dict_boot();
@@ -2733,13 +2725,6 @@ files_checked:
fil_crypt_threads_init();
fil_system_exit();
- /*
- Create a checkpoint before logging anything new, so that
- the current encryption key in use is definitely logged
- before any log blocks encrypted with that key.
- */
- log_make_checkpoint_at(LSN_MAX, TRUE);
-
/* Initialize online defragmentation. */
btr_defragment_init();
btr_defragment_thread_active = true;