XtraDB-based XtraBackup adds XtraDB fields to InnoDB databases

Reported by Laurynas Biveinis on 2012-04-25
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Status tracked in 2.2
2.0
Low
Unassigned
2.1
Low
Unassigned
2.2
Low
Alexey Kopytov

Bug Description

If an XtraDB-based binary is used to backup an InnoDB database, it will convert it to XtraDB: add XTRADB_1 marker in the dictionary header page and add the SYS_STATS table. While this is an user error of choosing the wrong binary, this is completely unnecessary and even potentially harmful to modify the database that is being backuped.

How to reproduce:
Adjust xb_basic.sh test to hexdump space = 0, page = 7 page in the original and restored database (see below).
./bootstrap.sh innodb51
./run.sh -c xtradb55 -t t/xb_basic.sh

$ cat dict-page-before.txt
0001c000 86 bd a7 ee 00 00 00 07 00 00 00 00 00 00 00 00 |................|
0001c010 00 00 00 00 00 01 c2 fa 00 06 00 00 00 00 00 00 |................|
0001c020 00 00 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 |................|
0001c030 00 00 00 00 00 1b 00 00 00 00 00 00 00 35 00 00 |.............5..|
0001c040 00 00 00 00 00 0a 00 00 00 08 00 00 00 09 00 00 |................|
0001c050 00 0a 00 00 00 0b 00 00 00 0c 00 00 00 00 00 00 |................|
0001c060 00 00 00 00 00 02 02 72 00 00 00 00 00 00 00 00 |.......r........|
0001c070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0001fff0 00 00 00 00 00 00 00 00 1b 40 00 94 00 01 c2 fa |.........@......|
00020000

$ cat dict-page-after.txt
0001c000 ae 6b a1 44 00 00 00 07 00 00 00 00 00 00 00 00 |.k.D............|
0001c010 00 00 00 00 00 6a e1 3c 00 06 00 00 00 00 00 00 |.....j.<........|
0001c020 00 00 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 |................|
0001c030 00 00 00 00 00 1b 00 00 00 00 00 00 00 35 00 00 |.............5..|
0001c040 00 00 00 00 00 0a 00 00 00 08 00 00 00 09 00 00 |................|
0001c050 00 0a 00 00 00 0b 00 00 00 0c 00 00 02 51 00 00 |.............Q..|
0001c060 00 00 00 00 00 02 02 72 00 00 00 00 00 00 00 00 |.......r........|
0001c070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0001c120 00 00 00 00 00 00 58 54 52 41 44 42 5f 31 00 00 |......XTRADB_1..|
0001c130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0001fff0 00 00 00 00 00 00 00 00 50 bf 06 92 00 6a e1 3c |........P....j.<|
00020000

=== modified file 'test/t/xb_basic.sh'
--- test/t/xb_basic.sh 2012-02-02 20:35:45 +0000
+++ test/t/xb_basic.sh 2012-04-25 12:46:11 +0000
@@ -11,6 +11,7 @@
 vlog "Backup created in directory $backup_dir"

 stop_mysqld
+hexdump $mysql_datadir/ibdata1 -C -n 16384 -s 114688 > dict-page-before.txt
 # Remove datadir
 rm -r $mysql_datadir
 #init_mysql_dir
@@ -27,6 +28,7 @@
 vlog "###########"
 innobackupex --copy-back $backup_dir

+hexdump $mysql_datadir/ibdata1 -C -n 16384 -s 114688 > dict-page-after.txt
 run_mysqld
 # Check sakila
 run_cmd ${MYSQL} ${MYSQL_ARGS} -e "SELECT count(*) from actor" sakila

Frederic Descamps (lefred) wrote :

I manually tested with mysql 5.5.22 MySQL Community Server (GPL) using innobackupex and indeed that page was modified after the restore. In fact after applying the logs ibdata1 is modified in the backup.

Stewart Smith (stewart) on 2012-06-15
Changed in percona-xtrabackup:
status: Confirmed → Triaged
Changed in percona-xtrabackup:
assignee: Laurynas Biveinis (laurynas-biveinis) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers