YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
err: /* don't touch anything more, in case we hit a bug */
fprintf(stderr, "%s: FAILED\n", my_progname_short);
free_tmpdir(&maria_chk_tmpdir);
my_hash_free(&tables_to_redo);
free_defaults(default_argv); exit(1);
}
staticstruct my_option my_long_options[] =
{
{"apply", 'a', "Apply log to tables: modifies tables! you should make a backup first! " " Displays a lot of information if not run with --silent",
(uchar **) &opt_apply, (uchar **) &opt_apply, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR, "Directory where character sets are.",
(char**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c', "if --display-only, check if record is fully readable (for debugging)",
(uchar **) &opt_check, (uchar **) &opt_check, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifndef DBUG_OFF
{"debug", '#', "Output debug log. Often the argument is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"force-crash", OPT_FORCE_CRASH, "Force crash after # recovery events",
&maria_recovery_force_crash_counter, 0,0, GET_ULONG, REQUIRED_ARG, 0, 0, ~(long) 0, 0, 0, 0}, #endif
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"display-only", 'd', "display brief info read from records' header",
&opt_display_only, &opt_display_only, 0, GET_BOOL,
NO_ARG,0, 0, 0, 0, 0, 0},
{ "end-lsn", 'e', "Alias for lsn-redo-end",
&lsn_redo_end_buf, &lsn_redo_end_buf, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "lsn-redo-end", 'e', "Stop applying at this lsn during redo. If " "this option is used UNDO:s will not be applied unless --lsn-undo-end is " "given", &lsn_redo_end_buf,
&lsn_redo_end_buf, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{ "lsn-undo-end", 'E', "Stop applying undo after this lsn has been applied",
&lsn_undo_end_buf, &lsn_undo_end_buf, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{"aria-log-dir-path", 'h', "Path to the directory where to store transactional log",
(char **) &maria_data_root, (char **) &maria_data_root, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "page-buffer-size", 'P', "The size of the buffer used for index blocks for Aria tables",
&opt_page_buffer_size, &opt_page_buffer_size, 0,
GET_ULL, REQUIRED_ARG, PAGE_BUFFER_INIT,
PAGE_BUFFER_INIT, SIZE_T_MAX, 0, (long) IO_SIZE, 0},
{ "print-log-control-file", 'l', "Print the content of the aria_log_control_file",
&opt_print_aria_log_control, &opt_print_aria_log_control, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ "start-from-lsn", 'o', "Start reading log from this lsn",
&opt_start_from_lsn, &opt_start_from_lsn, 0, GET_ULL, REQUIRED_ARG, 0, 0, ~(longlong) 0, 0, 0, 0 },
{"start-from-checkpoint", 'C', "Start applying from last checkpoint",
&opt_start_from_checkpoint, &opt_start_from_checkpoint, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's', "Print less information during apply/undo phase",
&opt_silent, &opt_silent, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"tables-to-redo", 'T', "List of tables separated with , that we should apply REDO on. Use this if you only want to recover some tables", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't', "Path for temporary files. Multiple paths can be specified, " "separated by " #ifdefined( _WIN32) "semicolon (;)" #else "colon (:)" #endif
, (char**) &opt_tmpdir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "translog-buffer-size", OPT_TRANSLOG_BUFFER_SIZE, "The size of the buffer used for transaction log for Aria tables",
&opt_translog_buffer_size, &opt_translog_buffer_size, 0,
GET_ULONG, REQUIRED_ARG, (long) TRANSLOG_PAGECACHE_SIZE, 1024L*1024L, (long) ~(ulong) 0, 0,
(long) IO_SIZE, 0},
{"undo", 'u', "Apply UNDO records to tables. (disable with --disable-undo). " "Will be automatically set if lsn-undo-end is used",
(uchar **) &opt_apply_undo, (uchar **) &opt_apply_undo, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"verbose", 'v', "Print more information during apply/undo phase",
&maria_recovery_verbose, &maria_recovery_verbose, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
staticvoid print_version(void)
{
printf("%s Ver 1.6 for %s on %s\n",
my_progname_short, SYSTEM_TYPE, MACHINE_TYPE);
}
staticvoid usage(void)
{
print_version();
puts("Copyright (C) 2007 MySQL AB, 2009-2011 Monty Program Ab, 2022 MariaDB Corporation");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
puts("and you are welcome to modify and redistribute it under the GPL license\n");
puts("Display or apply log records from a Aria transaction log");
puts("found in the current directory (for now)"); #ifndef IDENTICAL_PAGES_AFTER_RECOVERY
puts("\nNote: Aria is compiled without -DIDENTICAL_PAGES_AFTER_RECOVERY\n" "which means that the table files are not byte-to-byte identical to\n" "files created during normal execution. This should be ok, except for\n" "test scripts that tries to compare files before and after recovery."); #endif
printf("\nUsage: %s OPTIONS [-d | -a] -h `aria_log_directory`\n",
my_progname_short);
printf("or\n");
printf("Usage: %s OPTIONS -h `aria_log_directory` " "--print-log-control-file\n\n",
my_progname_short);
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) exit(ho_error);
if (start_from_lsn_buf)
{ if (get_lsn_arg(start_from_lsn_buf, &opt_start_from_lsn, "start-from-lsn"))
need_abort= 1;
} if (lsn_redo_end_buf)
{ if (get_lsn_arg(lsn_redo_end_buf, &opt_lsn_redo_end, "lsn-redo-end"))
need_abort= 1;
} if (lsn_undo_end_buf)
{ if (get_lsn_arg(lsn_undo_end_buf, &opt_lsn_undo_end, "lsn-undo-end"))
need_abort= 1;
}
if (!opt_apply)
opt_apply_undo= FALSE; if (!opt_apply_undo)
opt_lsn_undo_end= LSN_MAX;
if (*argc > 0)
{
need_help= 1;
fprintf(stderr, "Too many arguments given\n");
} if ((opt_display_only + opt_apply + opt_print_aria_log_control) != 1)
{
need_abort= 1;
fprintf(stderr, "You must use one and only one of the options 'display-only', \n" "'print-log-control-file' and 'apply'\n");
}
if (need_help || need_abort)
{
fflush(stderr); if (need_help)
usage(); exit(1);
} if (init_tmpdir(&maria_chk_tmpdir, opt_tmpdir)) exit(1);
maria_tmpdir= &maria_chk_tmpdir;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.