maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08573
Re: [Commits] 51926a1: Fix assertion failure.
Hi, Jan!
On May 16, Jan Lindström wrote:
> revision-id: 51926a1d2ed756902257fe802b1a01abb89a8fa3
> parent(s): 8d2117c0fd0a2211f1ec55f1d61fc5ae822c0ccf
> committer: Jan Lindström
> branch nick: 10.1-encrypt
> timestamp: 2015-05-16 08:58:03 +0300
> message:
>
> Fix assertion failure.
>
> ---
> mysql-test/suite/encryption/r/encrypt_and_grep.result | 6 +-----
> mysql-test/suite/encryption/t/encrypt_and_grep.test | 10 +---------
> storage/innobase/fil/fil0crypt.cc | 9 +++++++--
> storage/xtradb/fil/fil0crypt.cc | 9 +++++++--
> 4 files changed, 16 insertions(+), 18 deletions(-)
>
> diff --git a/mysql-test/suite/encryption/t/encrypt_and_grep.test b/mysql-test/suite/encryption/t/encrypt_and_grep.test
> index 1968b71..0301aa2 100644
> --- a/mysql-test/suite/encryption/t/encrypt_and_grep.test
> +++ b/mysql-test/suite/encryption/t/encrypt_and_grep.test
> @@ -52,7 +52,7 @@ insert t3 values (repeat('dummy', 42));
> SET GLOBAL innodb_encrypt_tables = off;
> SET GLOBAL innodb_encryption_threads = 4;
>
> ---echo # Wait max 10 min for key encryption threads to decrypt all space
> +--echo # Wait max 10 min for key encryption threads to decrypt all spacew
A typo? Did you mean "spaces" ?
> --let $wait_timeout= 600
> --let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
> --source include/wait_condition.inc
> @@ -69,14 +69,6 @@ SET GLOBAL innodb_encryption_threads = 4;
> --echo # t3 no on expecting FOUND
> -- let SEARCH_FILE=$t3_IBD
> -- source include/search_pattern_in_file.inc
> ---let SEARCH_PATTERN=foobar
> ---echo # ibdata1 expecting NOT FOUND
> --- let SEARCH_FILE=$ib1_IBD
> --- source include/search_pattern_in_file.inc
> ---let SEARCH_PATTERN=temp
> ---echo # ibdata1 expecting NOT FOUND
> --- let SEARCH_FILE=$ib1_IBD
> --- source include/search_pattern_in_file.inc
Why?
> --echo # Now turn on encryption and wait for threads to encrypt all spaces
> SET GLOBAL innodb_encryption_threads = 4;
> diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
> index 65be860..0c2280f 100644
> --- a/storage/innobase/fil/fil0crypt.cc
> +++ b/storage/innobase/fil/fil0crypt.cc
> @@ -2128,8 +2128,13 @@ fil_crypt_complete_rotate_space(
> crypt_data->rotate_state.end_lsn = state->end_lsn;
> }
>
> - ut_a(crypt_data->rotate_state.active_threads > 0);
> - crypt_data->rotate_state.active_threads--;
> + /* Remember that we can try to rotate tablespaces with
> + FIL_SPACE_ENCRYPTION_OFF and we might want to scrub them
> + also. */
Do you mean that when rotating FIL_SPACE_ENCRYPTION_OFF spaces
crypt_data->rotate_state.active_threads == 0?
> + if (crypt_data->rotate_state.active_threads > 0) {
> + crypt_data->rotate_state.active_threads--;
> + }
> +
> bool last = crypt_data->rotate_state.active_threads == 0;
Regards,
Sergei