Add quote between dbname on mysql request

This commit is contained in:
Dryusdan 2020-02-15 12:10:29 +01:00
parent 8beb2e0748
commit d458c006bd

View file

@ -97,7 +97,7 @@ do
## If all tables use InnoDB engine, we use --single-transaction
## Also, if one or more table use MyISAM engine, we need lock all tables
if mysql --user=${USERNAME} --password=${PASSWORD} --host=${HOST} --port=${PORT} -N -e "select engine from information_schema.tables where table_schema = ${dbname}" | grep "MyISAM" -q;
if mysql --user=${USERNAME} --password=${PASSWORD} --host=${HOST} --port=${PORT} -N -e "select engine from information_schema.tables where table_schema = '${dbname}'" | grep "MyISAM" -q;
then
warning "${dbname} have a table who using MyISAM engine."
info "Dumping with lock"