Optimize/Repair table scripts: ommit tables with table engine InnoDB.
This commit is contained in:
@@ -286,6 +286,14 @@ for _val in ${mysql_credential_args_arr[@]} ; do
|
||||
|
||||
for table in $TABLES ; do
|
||||
|
||||
# - Ommit InnoDB tables
|
||||
# -
|
||||
_engine="$($mysql $mysql_credential_args -N -s -e "SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = '$db' AND TABLE_NAME = '$table'")"
|
||||
if [[ "${_engine,,}" = 'innodb' ]] ; then
|
||||
echo -e " [$(date)] Ommit table '$table' - The storage engine (InnoDB) doesn't support repair"
|
||||
continue
|
||||
fi
|
||||
|
||||
if $terminal ; then
|
||||
blank_signs=""
|
||||
if [[ $length_table_name -gt ${#table} ]]; then
|
||||
|
||||
Reference in New Issue
Block a user