diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
commit | 347c164c35eddab388009470e6848cb361ac93f8 (patch) | |
tree | 2c0c44eac690f510bb0a35b2a13b36d606b77b6b /storage/maria/ma_recovery.c | |
parent | Releasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff) | |
download | mariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip |
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/ma_recovery.c')
-rw-r--r-- | storage/maria/ma_recovery.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index 006c8bef..df9b2024 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -1163,11 +1163,12 @@ end: /* The record may come from REPAIR, ALTER TABLE ENABLE KEYS, OPTIMIZE. */ + prototype_redo_exec_hook(REDO_REPAIR_TABLE) { int error= 1; MARIA_HA *info; - HA_CHECK param; + HA_CHECK *param; char *name; my_bool quick_repair; DBUG_ENTER("exec_REDO_LOGREC_REDO_REPAIR_TABLE"); @@ -1199,35 +1200,39 @@ prototype_redo_exec_hook(REDO_REPAIR_TABLE) */ tprint(tracef, " repairing...\n"); - maria_chk_init(¶m); - param.isam_file_name= name= info->s->open_file_name.str; - param.testflag= uint8korr(rec->header + FILEID_STORE_SIZE); - param.tmpdir= maria_tmpdir; - param.max_trid= max_long_trid; + if (!(param= my_malloc(PSI_INSTRUMENT_ME, sizeof(*param), MYF(MY_WME)))) + DBUG_RETURN(0); + + maria_chk_init(param); + param->isam_file_name= name= info->s->open_file_name.str; + param->testflag= uint8korr(rec->header + FILEID_STORE_SIZE); + param->tmpdir= maria_tmpdir; + param->max_trid= max_long_trid; DBUG_ASSERT(maria_tmpdir); info->s->state.key_map= uint8korr(rec->header + FILEID_STORE_SIZE + 8); - quick_repair= MY_TEST(param.testflag & T_QUICK); + quick_repair= MY_TEST(param->testflag & T_QUICK); - if (param.testflag & T_REP_PARALLEL) + if (param->testflag & T_REP_PARALLEL) { - if (maria_repair_parallel(¶m, info, name, quick_repair)) + if (maria_repair_parallel(param, info, name, quick_repair)) goto end; } - else if (param.testflag & T_REP_BY_SORT) + else if (param->testflag & T_REP_BY_SORT) { - if (maria_repair_by_sort(¶m, info, name, quick_repair)) + if (maria_repair_by_sort(param, info, name, quick_repair)) goto end; } - else if (maria_repair(¶m, info, name, quick_repair)) + else if (maria_repair(param, info, name, quick_repair)) goto end; if (_ma_update_state_lsns(info->s, rec->lsn, trnman_get_min_safe_trid(), - TRUE, !(param.testflag & T_NO_CREATE_RENAME_LSN))) + TRUE, !(param->testflag & T_NO_CREATE_RENAME_LSN))) goto end; error= 0; end: + my_free(param); DBUG_RETURN(error); } @@ -2579,6 +2584,8 @@ prototype_undo_exec_hook(UNDO_BULK_INSERT) return error; } +/* Stack size 18776 in clang. Ok as this is during recover */ +PRAGMA_DISABLE_CHECK_STACK_FRAME static int run_redo_phase(LSN lsn, LSN lsn_end, enum maria_apply_log_way apply) { @@ -2822,6 +2829,7 @@ err: translog_free_record_header(&rec); DBUG_RETURN(1); } +PRAGMA_REENABLE_CHECK_STACK_FRAME /** |