Trigger definitions are ignored for partial backups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Medium
|
Unassigned | ||
2.0 |
Won't Fix
|
Medium
|
Unassigned | ||
2.1 |
Triaged
|
Medium
|
Unassigned | ||
2.2 |
Triaged
|
Medium
|
Unassigned | ||
2.3 |
Triaged
|
Medium
|
Unassigned |
Bug Description
If I have a trigger defined on t1 and I back this table up only, the TRG file is copied but not the TRN.
[revin@forge msb_5_5_300]$ innobackupex --defaults-
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130516 20:35:23 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:
130516 20:35:23 innobackupex: Connected to MySQL server
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql server version 5.5.30-rel30.2-log
innobackupex: Created backup directory /ssd/msb/
130516 20:35:23 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-
innobackupex: Waiting for ibbackup (pid=15692) to suspend
innobackupex: Suspend file '/ssd/msb/
xtrabackup_55 version 2.1.1 for Percona Server 5.5.16 Linux (x86_64) (revision id: 600)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /ssd/msb/
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
130516 20:35:23 InnoDB: Warning: allocated tablespace 16218, old maximum was 9
>> log scanned up to (151574722451)
[01] Copying ./ibdata1 to /ssd/msb/
>> log scanned up to (151574722451)
>> log scanned up to (151574722451)
>> log scanned up to (151574722451)
>> log scanned up to (151574722451)
>> log scanned up to (151574722451)
[01] ...done
[01] Copying ./test/t1.ibd to /ssd/msb/
[01] ...done
>> log scanned up to (151574722451)
130516 20:35:30 innobackupex: Continuing after ibbackup has suspended
130516 20:35:30 innobackupex: Starting to lock all tables...
130516 20:35:30 innobackupex: All tables locked and flushed to disk
130516 20:35:30 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/ssd/msb/
innobackupex: Backing up files '/ssd/msb/
130516 20:35:30 innobackupex: Finished backing up non-InnoDB tables and files
130516 20:35:30 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '151574722451'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (151574722451)
xtrabackup: Transaction log of lsn (151574722451) to (151574722451) was copied.
130516 20:35:31 innobackupex: All tables unlocked
innobackupex: Backup created in directory '/ssd/msb/
innobackupex: MySQL binlog position: filename 'mysql-bin.000014', position 11308
130516 20:35:31 innobackupex: Connection to database server closed
130516 20:35:31 innobackupex: completed OK!
[revin@forge msb_5_5_300]$ ls -alh /ssd/msb/
total 379M
drwxrwxr-x. 3 revin revin 4.0K May 16 20:35 .
drwxrwxr-x. 11 revin revin 4.0K May 16 20:35 ..
-rw-rw-r--. 1 revin revin 263 May 16 20:35 backup-my.cnf
-rw-rw----. 1 revin revin 378M May 16 20:35 ibdata1
drwx------. 2 revin revin 45 May 16 20:35 test
-rw-rw-r--. 1 revin revin 13 May 16 20:35 xtrabackup_binary
-rw-rw-r--. 1 revin revin 25 May 16 20:35 xtrabackup_
-rw-rw----. 1 revin revin 99 May 16 20:35 xtrabackup_
-rw-rw----. 1 revin revin 2.5K May 16 20:35 xtrabackup_logfile
[revin@forge msb_5_5_300]$ ls -alh /ssd/msb/
total 116K
drwx------. 2 revin revin 45 May 16 20:35 .
drwxrwxr-x. 3 revin revin 4.0K May 16 20:35 ..
-rw-rw----. 1 revin revin 8.4K May 16 19:40 t1.frm
-rw-rw----. 1 revin revin 96K May 16 20:35 t1.ibd
-rw-rw----. 1 revin revin 280 May 16 20:05 t1.TRG
[revin@forge msb_5_5_300]$
summary: |
- Trigger Definitions are not Copied when Only Specific Tables are Backed - Up + Trigger definitions are ignore for partial backups |
summary: |
- Trigger definitions are ignore for partial backups + Trigger definitions are ignored for partial backups |
Can't repeat. This is what I tried:
CREATE TABLE t1(a INT);
DELIMITER ;;
CREATE TRIGGER t1 AFTER INSERT ON t1 FOR EACH ROW BEGIN
INSERT INTO t1 VALUES(1);
END;;
cat >$topdir/ tables_ file <<EOF
test.t1
EOF
innobackupex --no-timestamp --tables- file=$topdir/ tables_ file $topdir/backup
$ ls var1/backup/test/
t1.TRG t1.TRN t1.frm t1.ibd
Tested on both 2.0 and 2.1.
What was the contents of the tables file?