summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-04-02 18:13:46 +0300
committerMonty <monty@mariadb.org>2021-04-02 18:13:46 +0300
commit880baedcf6f2c1c342dc59e8a0e813c0ea728264 (patch)
tree42b370f7c778d08e374aa69ae629dcb00d3a6495
parent8341f582b2fe864027954282f96fb84e560cae72 (diff)
downloadmariadb-git-880baedcf6f2c1c342dc59e8a0e813c0ea728264.tar.gz
MDEV-17913 Encrypted transactional Aria tables remain corrupt after crash 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.
-rw-r--r--storage/maria/ma_crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/maria/ma_crypt.c b/storage/maria/ma_crypt.c
index 95b84d38221..564edb4bbe8 100644
--- a/storage/maria/ma_crypt.c
+++ b/storage/maria/ma_crypt.c
@@ -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);
@@ -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);