ARIA_CHK(1)

πŸ“¦
version 13.0.2 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ aria_chk β€” the Aria table-maintenance utility ✨

okay bestie, welcome to aria_chk(1) πŸ’… this is the User Commands section and she is that girl for Aria tables. buckle up.


πŸŽ€ SYNOPSIS πŸŽ€

aria_chk [OPTIONS] tables[.MAI]

πŸ’– DESCRIPTION πŸ’–

So like β€” describing, checking, and repairing Aria tables. that's the whole vibe. and the plot twist? if you run it with no options at all, every table you name on the command line gets checked for errors. main character energy fr fr 🫢

🌸 Global options 🌸

  • -#, --debug=... β€” dump a debug log. usually it's like d:t:o,filename.
  • -H, --HELP β€” print every argument option, sorted alphabetically. very organized of her.
  • -?, --help β€” print all the options, but grouped. (yes, there are two help flags. she contains multitudes 😭)
  • --datadir=path β€” the path for the control file (and also for logs, if you're not using --logdir).
  • --logdir=path β€” path for log files.
  • --ignore-control-file β€” don't open the control file.
⚠️ ONLY use this if you are sure the tables aren't in use by another program! no cap, that's the whole warning.
  • --require-control-file β€” abort if we can't find or read the maria_log_control file.
  • -s, --silent β€” only print errors. and you can stack two -s to make maria_chk very silent. like, so quiet. shhh 🀫
  • -t, --tmpdir=path β€” path for temporary files. you can specify multiple paths separated by a colon (:), and they get used round-robin style. cute.
  • -v, --verbose β€” print more info. plays nice with --description and --check. stack lots of -v for maximum verbosity ✨
  • -V, --version β€” print the version and dip. bye πŸ‘‹
  • -w, --wait β€” wait if the table is locked. patient queen.

πŸ”₯ Check options (check is the default action for aria_chk) πŸ”₯

  • -c, --check β€” check the table for errors. the classic.
  • -e, --extend-check β€” check the table VERY thoroughly. only do this in extreme cases, because aria_chk should normally be able to tell if the table is ok without this switch. it's giving overkill πŸ’€
  • -F, --fast β€” only check tables that haven't been closed properly.
  • -C, --check-only-changed β€” only check tables that have changed since the last check.
  • -f, --force β€” restart with -r if there are any errors in the table. states get updated just like with --update-state.
  • -i, --information β€” print statistics info about the table being checked.
  • -m, --medium-check β€” faster than extend-check, but it only finds 99.99% of all errors. should be good enough for most cases tbh.
  • -T, --read-only β€” don't mark the table as checked.
  • -U, --update-state β€” mark tables as crashed if any errors were found, and clean if the check found no errors but the table was marked 'not clean' before. this lets you get rid of warnings like 'table not properly closed'. and if the table was updated, it also updates the timestamp for when the check was made. this option is on by default! use --skip-update-state to turn it off πŸ‘‘
  • --warning-for-wrong-transaction-id β€” give a warning if we find a transaction id in the table that's bigger than what exists in the control file. use --skip-... to disable the warning.

πŸ¦‹ Recover (repair) options (when using --recover or --safe-recover) πŸ¦‹

  • -B, --backup β€” make a backup of the .MAD file as 'filename-time.BAK'.
  • --correct-checksum β€” correct checksum information for the table.
  • -D, --data-file-length=# β€” max length of the data file (used when recreating the data file when it's full).
  • -e, --extend-check β€” try to recover every possible row from the data file. normally this will also find a lot of garbage rows, so don't use this option if you're not totally desperate. seriously. desperate desperate 😭
  • -f, --force β€” overwrite old temporary files.
  • -k, --keys-used=# β€” tell Aria to update only some specific keys. # is a bit mask of which keys to use. handy for faster inserts πŸ’…
  • --max-record-length=# β€” skip rows bigger than this if aria_chk can't allocate memory to hold them.
  • -r, --recover β€” can fix almost anything except unique keys that aren't unique. almost. not all. πŸ’€
  • -n, --sort-recover β€” forces recovering with sorting, even if the temporary file would be very big.
  • -p, --parallel-recover β€” uses the same technique as -r and -n, but creates all the keys in parallel, in different threads. multitasking icon ✨
  • -o, --safe-recover β€” uses the old recovery method. slower than -r, but it can handle a couple of cases where -r reports that it can't fix the data file.
  • --transaction-log β€” log the repair command to the transaction log. this is needed if you want to use aria_read_log to repeat the repair.
  • --character-sets-dir=... β€” directory where character sets live.
  • --set-collation=name β€” change the collation used by the index.
  • -q, --quick β€” faster repair, because it doesn't modify the data file. you can give a second -q to force aria_chk to modify the original datafile in case of duplicate keys.
⚠️ NOTE: tables where the data file is corrupted can't be fixed with this option.
  • -u, --unpack β€” unpack a file packed with ariapack.

🧚 Other actions 🧚

  • -a, --analyze β€” analyze the distribution of keys. this will make some joins in MariaDB faster. you can check the calculated distribution by using '--description --verbose table_name'.
  • --stats_method=name β€” specifies how the index statistics collection code should treat NULLs. possible values of name are "nulls_unequal" (default for 4.1/5.0), "nulls_equal" (emulate 4.0), and "nulls_ignored".
  • -d, --description β€” prints some information about the table.
  • -A, --set-auto-increment[=value] β€” force auto_increment to start at this value or higher. if no value is given, then it sets the next auto_increment value to the highest used value for the auto key + 1.
  • -S, --sort-index β€” sort index blocks. this speeds up 'read-next' in applications.
  • -R, --sort-records=# β€” sort records according to an index. this makes your data much more localized and may speed things up. (it may be VERY slow to do a sort the first time!)
  • -b, --block-search=# β€” find a record, a block at a given offset belongs to.
  • -z, --zerofill β€” fill empty space in data and index files with zeroes. this makes the data file movable between different servers. ✈️
  • --zerofill-keep-lsn β€” like --zerofill, but does not zero out the LSN of data/index pages.

πŸ’œ Variables πŸ’œ

  • --page_buffer_size=# β€” size of the page buffer. used by --safe-repair.
  • --read_buffer_size=# β€” read buffer size for sequential reads during scanning.
  • --sort_buffer_size=# β€” size of the sort buffer. used by --recover.
  • --sort_key_blocks=# β€” internal buffer for sorting keys. don't touch. πŸ™ˆ
  • --write_buffer_size=# β€” write buffer size for sequential writes during repair.

Default options get read from the following files, in the given order:

/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf

The following groups are read: aria_chk

The following options may be given as the first argument:

  • --print-defaults β€” print the program argument list and exit.
  • --no-defaults β€” don't read default options from any option file.
  • --defaults-file=# β€” only read default options from the given file #.
  • --defaults-extra-file=# β€” read this file after the global files are read.

🌈 SEE ALSO 🌈

For more information, please refer to the MariaDB Documentation, available online at <https://mariadb.com/docs/> β€” well, that's where it lives, anyway. iykyk 🫢


and that's the whole page, bestie!! πŸ’– this was aria_chk Ver 1.2, from May 2014, filed under User Commands, and honestly? she ate. go check those tables. slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from