Skip to content

Commit

Permalink
Fix a random result mismatch of encryption.innodb_encrypt_log
Browse files Browse the repository at this point in the history
Disable change buffering, so that some data that was previously
written to the encrypted redo log will not end up being copied
to the unencrypted redo log due to change buffer merge.
  • Loading branch information
dr-m committed Aug 9, 2017
1 parent c720e68 commit d0c66c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions mysql-test/suite/encryption/r/innodb_encrypt_log.result
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CREATE TEMPORARY TABLE t LIKE t0;
INSERT INTO t VALUES
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
SET GLOBAL innodb_change_buffering=none;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t0
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/suite/encryption/t/innodb_encrypt_log.test
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ INSERT INTO t VALUES
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');

# Prevent change buffering of key(col_char_key), so that
# after the restart, the data ('secret','success','secure','sacrament')
# cannot be emitted to the unencrypted redo log by change buffer merge.
SET GLOBAL innodb_change_buffering=none;

# Force a redo log flush at the next commit.
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t0
Expand Down

0 comments on commit d0c66c8

Please sign in to comment.