mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
fixed database disk space calculation
This commit is contained in:
parent
b58c696a86
commit
2ce5290efc
1 changed files with 1 additions and 1 deletions
|
@ -509,7 +509,7 @@ get_mysql_disk_usage() {
|
|||
fi
|
||||
|
||||
query="SELECT SUM( data_length + index_length ) / 1024 / 1024 \"Size\"
|
||||
FROM information_schema.TABLES WHERE table_schema=\`$database\`"
|
||||
FROM information_schema.TABLES WHERE table_schema='$database'"
|
||||
usage=$(mysql -h $HOST -u $USER -p$PASSWORD -P $PORT -e "$query" |tail -n1)
|
||||
if [ "$usage" == 'NULL' ] || [ "${usage:0:1}" -eq '0' ]; then
|
||||
usage=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue