diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
commit | a2a2e32c02643a0cec111511220227703fda1cd5 (patch) | |
tree | 69cc2b631234c2a8e026b9cd4d72676c61c594df /storage/maria/ma_check.c | |
parent | Releasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff) | |
download | mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip |
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/ma_check.c')
-rw-r--r-- | storage/maria/ma_check.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index e4ba0726..8c07e3c6 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -3656,28 +3656,35 @@ err: int maria_zerofill(HA_CHECK *param, MARIA_HA *info, const char *name) { - my_bool error, reenable_logging, + my_bool error= 0, reenable_logging, zero_lsn= !(param->testflag & T_ZEROFILL_KEEP_LSN); MARIA_SHARE *share= info->s; DBUG_ENTER("maria_zerofill"); if ((reenable_logging= share->now_transactional)) _ma_tmp_disable_logging_for_table(info, 0); - if (!(error= (maria_zerofill_index(param, info, name) || - maria_zerofill_data(param, info, name) || - _ma_set_uuid(info->s, 0)))) + + if (share->state.changed & (STATE_NOT_ZEROFILLED | (zero_lsn ? STATE_HAS_LSN : 0))) + error= (maria_zerofill_index(param, info, name) || + maria_zerofill_data(param, info, name)); + if (!error) + error= _ma_set_uuid(info->s, 0); + + if (!error) { /* - Mark that we have done zerofill of data and index. If we zeroed pages' - LSN, table is movable. + Mark that we have done zerofill of data and index. If we zeroed the LSN + on the pages, table is movable. */ share->state.changed&= ~STATE_NOT_ZEROFILLED; if (zero_lsn) { - share->state.changed&= ~(STATE_NOT_MOVABLE | STATE_MOVED); + share->state.changed&= ~(STATE_NOT_MOVABLE | STATE_MOVED | STATE_HAS_LSN); /* Table should get new LSNs */ share->state.create_rename_lsn= share->state.is_of_horizon= share->state.skip_redo_lsn= LSN_NEEDS_NEW_STATE_LSNS; } + else + share->state.changed|= STATE_HAS_LSN; /* Ensure state is later flushed to disk, if within maria_chk */ info->update= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); |