Skip to content

Commit

Permalink
MDEV-17913 Encrypted transactional Aria tables remain corrupt after c…
Browse files Browse the repository at this point in the history
…rash recovery, automatic repairment does not work

This was because of a wrong test in encryption code that wrote random
numbers over the LSN for pages for transactional Aria tables during repair.
The effect was that after an ALTER TABLE ENABLE KEYS of a encrypted
recovery of the tables would not work.

The test cases will be pushed into 10.5 as it requires of several changes
to check table that safer not to backport.
  • Loading branch information
montywi committed Apr 2, 2021
1 parent 8341f58 commit 880baed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/maria/ma_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
return 1;
}

if (!share->now_transactional)
if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
Expand Down Expand Up @@ -392,7 +392,7 @@ static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
return 1;
}

if (!share->now_transactional)
if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
Expand Down

0 comments on commit 880baed

Please sign in to comment.