mariadb-schema-change for MariaDB Tools
This page is part of MariaDB's Documentation.
The parent of this page is: Command-Line Interfaces for MariaDB Tools
Topics on this page:
Overview
The mariadb-schema-change
utility.
mariadb-schema-change Options for MariaDB Tools
Option | Argument | Description |
---|---|---|
string | The schema modification, without the ALTER TABLE keywords | |
string | How to modify foreign keys so they reference the new table | |
Execute ANALYZE TABLE on the new table before swapping with the old one (default yes). Disable using: --noanalyze-before-swap | ||
Prompt for a password when connecting to MariaDB | ||
string | Channel name used when connected to a server using replication channels | |
string | Default character set | |
Parses the --alter specified and tries to warn of possible unintended behavior ( default yes). Disable using: --nocheck-alter | ||
Check for self-referencing foreign keys ( default yes). Disable using: --nocheck-foreign-keys | ||
time | Sleep time between checks for --max-lag ( default 1). Optional suffix s=seconds, m= minutes, h=hours, d=days; if no suffix, s is used. | |
Check query execution plans for safety ( default yes). Disable using: --nocheck-plan | ||
Abort if any replication filter is set on any server (default yes). Disable using: --nocheck-replication-filters | ||
string | Pause the data copy until this replica's lag is less than --max-lag | |
Avoid mariadb-schema-change to run if the specified statement for --alter is trying to add an unique index (default yes). Disable using: --nocheck-unique-key-change | ||
string | Prefer this index for chunking tables | |
integer | Use only this many left-most columns of a -- chunk-index | |
size | Number of rows to select for each chunk copied (default 1000) | |
float | Do not copy chunks this much larger than the desired chunk size (default 4.0) | |
float | Adjust the chunk size dynamically so each data-copy query takes this long to execute ( default 0.5) | |
string | Read this comma-separated list of config files; if specified, this must be the first option on the command line | |
string | Examine SHOW GLOBAL STATUS after every chunk, and abort if the load is too high ( default Threads_ | |
string | Create the new table on a different partition using the DATA DIRECTORY feature | |
string | Connect to this database | |
Remove ENGINE from the new table | ||
string | Only read mysql options from the given file | |
Drop the new table if copying the original table fails (default yes). Disable using: --nodrop-new-table | ||
Drop the original table after renaming it ( default yes). Disable using: --nodrop-old-table | ||
Drop triggers on the old table. --no-drop- triggers forces --no-drop-old-table (default yes). Disable using: --nodrop-triggers | ||
Create and alter the new table, but do not create triggers, copy data, or replace the original table | ||
Indicate that you have read the documentation and want to alter the table | ||
This options bypasses confirmation in case of using alter-foreign-keys-method = none , which might break foreign key constraints | ||
The NibbleIterator in mariadb-schema-change can detect indexes having ENUM fields and if the items it has are sorted or not | ||
Show help and exit | ||
string | Connect to host | |
float | Somewhat similar to --max-lag but for PXC clusters | |
time | Pause the data copy until all replicas' lag is less than this value (default 1s). Optional suffix s=seconds, m=minutes, h= hours, d=days; if no suffix, s is used. | |
string | Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than their thresholds (default Threads_ | |
string | New table name before it is swapped. %T is replaced with the original table name ( default %T_ | |
Allows MODIFYing a column that allows NULL values to one that doesn't allow them | ||
Check foreigns keys only on tables on the same schema than the original table | ||
string | Password to use when connecting | |
string | Execution will be paused while the file specified by this param exists | |
string | Create the given PID file | |
string | Perl module file that defines a pt_ | |
integer | Port number to use for connection | |
Preserves old triggers when specified | ||
Print SQL statements to STDOUT | ||
string | Print progress reports to STDERR while copying rows (default time,30) | |
Do not print messages to STDOUT (disables -- progress) | ||
integer | Number of levels to recurse in the hierarchy when discovering replicas | |
string | Preferred recursion method for discovering replicas (default processlist,hosts) | |
If the original table was created using the DATA DIRECTORY feature, remove it and create the new table in MariaDB default directory without creating a new isl file (default no) | ||
Warning! This option creates reverse triggers on the new table before it starts copying | ||
string | Set the MariaDB variables in this comma- separated list of variable=value pairs | |
DSN | DSN to skip when checking slave lag | |
string | Sets the password to be used to connect to the slaves | |
string | Sets the user to be used to connect to the slaves | |
float | How long to sleep (in seconds) after copying each chunk (default 0) | |
string | Socket file to use for connection | |
Print statistics about internal counters | ||
Swap the original table and the new, altered table (default yes). Disable using: --noswap-tables | ||
string | How many times to try critical operations | |
string | User for login if not current user | |
Show version and exit |