mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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. Fixed by changing testing of !share->now_transactional to !share->base.born_transactional. Other things: - Extended Aria check_table() to check for wrong (= too big) LSN numbers. - If check_table() failed just because of wrong LSN or TRN numbers, a following repair table will just do a zerofill which is much faster. - Limit number of LSN errors in one check table to MAX_LSN_ERROR (10). - Removed old obsolete test of 'if (error_count & 2)'. Changed error_count and warning_count from bits to numbers of errors/warnings as this is more useful.
This commit is contained in:
parent
7f75acc05c
commit
81258f1432
13 changed files with 166 additions and 48 deletions
|
|
@ -7926,7 +7926,8 @@ void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file,
|
|||
else
|
||||
{
|
||||
/* Give error, but don't flood the log */
|
||||
if (skipped_lsn_err_count++ < 10 && ! info->s->redo_error_given++)
|
||||
if (skipped_lsn_err_count++ < MAX_LSN_ERRORS &&
|
||||
! info->s->redo_error_given++)
|
||||
{
|
||||
eprint(tracef, "Table %s has wrong LSN: " LSN_FMT " on page: %llu",
|
||||
(index_file ? info->s->data_file_name.str :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue