tokubackup will not take InnoDB tablespace file if it is created outside default datadir
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Triaged
|
Critical
|
Unassigned | |||
5.7 |
Triaged
|
Critical
|
Unassigned |
Bug Description
Hi,
If you try to create InnoDB tablespace file outside default datadir:
mysql> CREATE TABLE t2 (c1 INT PRIMARY KEY) DATA DIRECTORY = '/home/datadir';
TokuBackup will not consider t2.ibd file while taking backup:
root@percona-
auto.cnf ib_logfile1 mysql_upgrade_info tc.log tokudb.environment __tokudb_
ibdata1 log000000000001
ib_logfile0 mysql t1 tokudb.directory __tokudb_
root@percona-
db.opt t1.frm t1.ibd t1.isl t2.frm t2.isl
And definitely in recovery process it will crash.
for XtraBackup it will take the .ibd file to default datadir and after recovery process, datafile path will be changed:
2015-11-05 12:15:55 7f52c7bdf7c0 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2015-11-05 12:15:55 16709 [ERROR] InnoDB: A link file was found named './t1/t1.isl' but the linked tablespace '/home/
2015-11-05 12:15:55 16709 [Note] InnoDB: The InnoDB data dictionary table SYS_DATAFILES for tablespace ID 7 was updated to use file ./t1/t1.ibd.
mysql> SELECT * FROM INFORMATION_
+------
| SPACE | PATH |
+------
| 1 | ./mysql/
| 2 | ./mysql/
| 3 | ./mysql/
| 4 | ./mysql/
| 5 | ./mysql/
| 7 | ./t1/t1.ibd |
+------
6 rows in set (0.00 sec)
tags: |
added: tokubackup removed: tokudb-backup |
Summary: Tablespace outside datadir? It won't be backed up + corrupt backup!