diff options
Diffstat (limited to 'handlers/mysql.in')
-rw-r--r-- | handlers/mysql.in | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/handlers/mysql.in b/handlers/mysql.in index 65deebb..ceed620 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -256,10 +256,15 @@ then for db in $databases do DUMP_BASE="$MYSQLDUMP $defaultsfile $sqldumpoptions" - if [ "$db" = "information_schema" ] || [ "$db" = "performance_schema" ] - then - DUMP_BASE="${DUMP_BASE} --skip-lock-tables" - fi + + case "$db" in + information_schema) + DUMP_BASE="${DUMP_BASE} --skip-lock-tables" + ;; + performance_schema) + DUMP_BASE="${DUMP_BASE} --skip-lock-tables --skip-events" + ;; + esac # Dumping structure and data DUMP="$DUMP_BASE $ignore $db" @@ -271,7 +276,7 @@ then DUMP_STRUCT="$DUMP_BASE --no-data $db" for qualified_table in $nodata do - table=$( expr match "$qualified_table" "$db\.\([^\w]*\)" ) + table=$( expr match "$qualified_table" "$db\.\(.\+\)" ) DUMP_STRUCT="$DUMP_STRUCT $table" done DUMP="( $DUMP; $DUMP_STRUCT )" @@ -297,7 +302,7 @@ then if [ "$compress" == "yes" ]; then execstr="$DUMP | $GZIP $GZIP_OPTS > '$dumpdir/${db}.sql.gz'" else - execstr="$DUMP -r '$dumpdir/${db}.sql'" + execstr="$DUMP > '$dumpdir/${db}.sql'" fi fi debug "su $user -c \"$execstr\"" |