Optimize/Repair table scripts: ommit tables with table engine InnoDB.

This commit is contained in:
2018-08-31 03:24:42 +02:00
parent dafc793007
commit 0fc3ec06be
4 changed files with 260 additions and 13 deletions

View File

@@ -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