From aeca6912a8f67ecf69ba9b8a436a2a695e5f3acc Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 14 Jun 2010 19:06:59 +0200 Subject: Added GZIP_OPTS option, defaulting to --rsyncable. ... so that this option can be disabled on systems that don't support it. This also allows to use another compression program, such as pbzip2 on SMP machines (closes Roundup bug #2405). --- handlers/mysql.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'handlers/mysql.in') diff --git a/handlers/mysql.in b/handlers/mysql.in index 3488c51..4dece24 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -279,7 +279,7 @@ then fatal "mysqld doesn't appear to be running!" fi if [ "$compress" == "yes" ]; then - execstr="$VSERVER $vsname exec $DUMP | $GZIP --rsyncable > '$vroot$dumpdir/${db}.sql.gz'" + execstr="$VSERVER $vsname exec $DUMP | $GZIP $GZIP_OPTS > '$vroot$dumpdir/${db}.sql.gz'" else execstr="$VSERVER $vsname exec $DUMP -r '$vroot$dumpdir/${db}.sql'" fi @@ -290,7 +290,7 @@ then fatal "mysqld doesn't appear to be running!" fi if [ "$compress" == "yes" ]; then - execstr="$DUMP | $GZIP --rsyncable > '$dumpdir/${db}.sql.gz'" + execstr="$DUMP | $GZIP $GZIP_OPTS > '$dumpdir/${db}.sql.gz'" else execstr="$DUMP -r '$dumpdir/${db}.sql'" fi -- cgit v1.2.3 From 9179c59b50ddf1a8e11817924df7f589a76500b4 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 24 Jun 2010 16:18:44 +0200 Subject: mysql: don't lock tables in the information_schema database (Closes: #587011) --- ChangeLog | 3 +++ handlers/mysql.in | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'handlers/mysql.in') diff --git a/ChangeLog b/ChangeLog index 5de8552..8dec95c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,9 @@ version 0.9.8 -- UNRELEASED . Better example.dup documentation. Thanks, Alster! . Added ftp_password option to securely transmit the FTP password from backupninja to duplicity. + mysql: + . Don't lock tables in the information_schema database + (Closes: #587011) doc changes manpage: . Fix typo in manpage (Closes: #583778) diff --git a/handlers/mysql.in b/handlers/mysql.in index 4dece24..68d5197 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -255,6 +255,10 @@ then for db in $databases do DUMP_BASE="$MYSQLDUMP $defaultsfile $sqldumpoptions" + if [ "$db" = "information_schema" ] + then + DUMP_BASE="${DUMP_BASE} --skip-lock-tables" + fi # Dumping structure and data DUMP="$DUMP_BASE $ignore $db" -- cgit v1.2.3 From 40155781065eb7254eb9fc9c48bd85b0b8ace4c0 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 24 Jun 2010 16:53:58 +0200 Subject: Fix code logic to make dbusername/dbpassword actually usable (Closes Redmine bug #2264) --- AUTHORS | 1 + ChangeLog | 2 ++ handlers/mysql.in | 15 ++++++++------- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'handlers/mysql.in') diff --git a/AUTHORS b/AUTHORS index 92a2184..8c1d1c8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,3 +34,4 @@ Olivier Berger -- much work on the dup handler stefan -- dup support for Amazon S3 buckets maniacmartin -- rdiff confusing error message fix Chris Nolan -- maildir subdirectory expansion +Dan Carley -- mysql bugfix diff --git a/ChangeLog b/ChangeLog index 8dec95c..dd8f605 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,8 @@ version 0.9.8 -- UNRELEASED mysql: . Don't lock tables in the information_schema database (Closes: #587011) + . Fix code logic to make dbusername/dbpassword actually usable + (Closes Redmine bug #2264) doc changes manpage: . Fix typo in manpage (Closes: #583778) diff --git a/handlers/mysql.in b/handlers/mysql.in index 68d5197..0282046 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -86,7 +86,7 @@ fi defaultsfile="" -if [ "$dbusername" != "" -a "$dbpassword" != "" ] +if [ -n "$dbusername" -a -n "$dbpassword" ] then if [ $usevserver = yes ] then @@ -140,13 +140,10 @@ password="$dbpassword" EOF umask $oldmask defaultsfile="--defaults-extra-file=$mycnf" -fi -# if a user is not set, use $configfile, otherwise use $mycnf -if [ "$user" == "" ]; then - user=root; - defaultsfile="--defaults-extra-file=$configfile" -else +# else, if a user is set use her .my.cnf +elif [ -n "$user" ] +then userset=true; if [ $usevserver = yes ] then @@ -169,6 +166,10 @@ else defaultsfile="--defaults-extra-file=$userhome/.my.cnf" debug "using $defaultsfile" +# otherwise use $configfile +else + user=root + defaultsfile="--defaults-extra-file=$configfile" fi ####################################################################### -- cgit v1.2.3