Skip to content

Commit 880baed

Browse files
committed
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.
1 parent 8341f58 commit 880baed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/maria/ma_crypt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
268268
return 1;
269269
}
270270

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

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

0 commit comments

Comments
 (0)