Bug#673572: backupninja: Warning message: mysqldump: Couldn't execute 'show events on 'performance_schema'

2012-05-20 Thread intrigeri
tags 673572 + fixed-upstream
tags 673572 + upstream
thanks

Hi,

Glennie Vignarajah wrote (19 May 2012 19:55:09 GMT) :
> As it appears that it is not possible to backup events from this
> virtual database, the attached patch adds the option '--skip-events'
> when backing up this database in order to correct this warning.

Applied to upstream Git (b050656), thanks!



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#673572: backupninja: Warning message: mysqldump: Couldn't execute 'show events on 'performance_schema'

2012-05-19 Thread Glennie Vignarajah
Package: backupninja
Version: 1.0~rc1-1
Severity: normal
Tags: patch

Hello,
 Since mysql server version is 5.5 under Debian, the message "Warning: 
mysqldump: Couldn't execute 'show events': Access denied for user 
'backupninja'@'localhost' to database 'performance_schema' (1044)
 Warning: Failed to dump mysql databases performance_schema" is issued when 
backing up the performance_schema database. 
 As it appears that it is not possible to backup events from this virtual 
database, the attached patch adds the option '--skip-events' when backing up 
this database in order to correct this warning.
 Regards,


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages backupninja depends on:
ii  bash4.2-2
ii  bsd-mailx [mailx]   8.1.2-0.2006cvs-1
ii  dialog  1.1-20120215-1
ii  gawk1:4.0.1+dfsg-1
ii  heirloom-mailx [mailx]  12.5-2
ii  mawk1.3.3-17

backupninja recommends no packages.

Versions of packages backupninja suggests:
pn  bzip2  1.0.6-1
pn  debconf-utils  1.5.43
pn  duplicity  
pn  genisoimage
pn  hwinfo 16.0-2.2
pn  mdadm  3.2.4-1
pn  rdiff-backup   1.2.8-7
pn  rsync  3.0.9-1
pn  subversion 1.6.17dfsg-3
pn  trickle
pn  wodim  

-- Configuration Files:
/etc/backupninja.conf changed [not included]

-- no debconf information
Index: backupninja-1.0~rc1/handlers/mysql.in
===
--- backupninja-1.0~rc1.orig/handlers/mysql.in	2012-05-15 17:21:41.0 +0200
+++ backupninja-1.0~rc1/handlers/mysql.in	2012-05-19 20:59:02.417874223 +0200
@@ -256,10 +256,11 @@
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"