Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
40bae98c
Commit
40bae98c
authored
Nov 06, 2017
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12108 Fix backup for Innodb tables with DATA DIRECTORY
parent
56911096
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
1 deletion
+82
-1
mysql-test/suite/mariabackup/data_directory.result
mysql-test/suite/mariabackup/data_directory.result
+13
-0
mysql-test/suite/mariabackup/data_directory.test
mysql-test/suite/mariabackup/data_directory.test
+23
-0
mysql-test/suite/mariabackup/partition_datadir.opt
mysql-test/suite/mariabackup/partition_datadir.opt
+1
-0
mysql-test/suite/mariabackup/partition_datadir.result
mysql-test/suite/mariabackup/partition_datadir.result
+22
-0
mysql-test/suite/mariabackup/partition_datadir.test
mysql-test/suite/mariabackup/partition_datadir.test
+22
-0
storage/xtradb/fil/fil0fil.cc
storage/xtradb/fil/fil0fil.cc
+1
-1
No files found.
mysql-test/suite/mariabackup/data_directory.result
0 → 100644
View file @
40bae98c
CREATE TABLE t(a INT) ENGINE=InnoDB DATA DIRECTORY='table_data_dir';
INSERT INTO t VALUES(1);
# xtrabackup backup
# xtrabackup prepare
DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SELECT * FROM t;
a
1
DROP TABLE t;
mysql-test/suite/mariabackup/data_directory.test
0 → 100644
View file @
40bae98c
let
$table_data_dir
=
$MYSQLTEST_VARDIR
/
ddir
;
mkdir
$table_data_dir
;
--
replace_result
$table_data_dir
table_data_dir
EVAL
CREATE
TABLE
t
(
a
INT
)
ENGINE
=
InnoDB
DATA
DIRECTORY
=
'$table_data_dir'
;
INSERT
INTO
t
VALUES
(
1
);
echo
# xtrabackup backup;
let
$targetdir
=
$MYSQLTEST_VARDIR
/
tmp
/
backup
;
--
disable_result_log
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
target
-
dir
=
$targetdir
;
--
enable_result_log
--
source
include
/
shutdown_mysqld
.
inc
echo
# xtrabackup prepare;
--
disable_result_log
exec
$XTRABACKUP
--
prepare
--
target
-
dir
=
$targetdir
;
--
source
include
/
start_mysqld
.
inc
DROP
TABLE
t
;
rmdir
$table_data_dir
;
--
source
include
/
restart_and_restore
.
inc
--
enable_result_log
SELECT
*
FROM
t
;
DROP
TABLE
t
;
rmdir
$targetdir
;
rmdir
$table_data_dir
;
mysql-test/suite/mariabackup/partition_datadir.opt
0 → 100644
View file @
40bae98c
--partition
\ No newline at end of file
mysql-test/suite/mariabackup/partition_datadir.result
0 → 100644
View file @
40bae98c
CREATE TABLE t(i int)
ENGINE=InnoDB
PARTITION BY RANGE (i)
(PARTITION p0 VALUES LESS THAN (100),
PARTITION P1 VALUES LESS THAN (200),
PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = "D:/work/10.1/xxx/mysql-test/var/partitdata",
PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = "D:/work/10.1/xxx/mysql-test/var/partitdata",
PARTITION p4 VALUES LESS THAN MAXVALUE);
INSERT INTO t VALUES (1), (101), (201), (301), (401);
DROP TABLE t;
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SELECT * FROM t;
i
1
101
201
301
401
DROP TABLE t;
mysql-test/suite/mariabackup/partition_datadir.test
0 → 100644
View file @
40bae98c
let
$targetdir
=
$MYSQLTEST_VARDIR
/
backup
;
mkdir
$targetdir
;
mkdir
$MYSQLTEST_VARDIR
/
partitdata
;
eval
CREATE
TABLE
t
(
i
int
)
ENGINE
=
InnoDB
PARTITION
BY
RANGE
(
i
)
(
PARTITION
p0
VALUES
LESS
THAN
(
100
),
PARTITION
P1
VALUES
LESS
THAN
(
200
),
PARTITION
p2
VALUES
LESS
THAN
(
300
)
DATA
DIRECTORY
=
"
$MYSQLTEST_VARDIR
/partitdata"
,
PARTITION
p3
VALUES
LESS
THAN
(
400
)
DATA
DIRECTORY
=
"
$MYSQLTEST_VARDIR
/partitdata"
,
PARTITION
p4
VALUES
LESS
THAN
MAXVALUE
);
INSERT
INTO
t
VALUES
(
1
),
(
101
),
(
201
),
(
301
),
(
401
);
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
--
target
-
dir
=
$targetdir
;
exec
$XTRABACKUP
--
prepare
--
target
-
dir
=
$targetdir
;
DROP
TABLE
t
;
rmdir
$MYSQLTEST_VARDIR
/
partitdata
;
--
source
include
/
restart_and_restore
.
inc
--
enable_result_log
SELECT
*
FROM
t
;
DROP
TABLE
t
;
rmdir
$targetdir
;
rmdir
$MYSQLTEST_VARDIR
/
partitdata
;
storage/xtradb/fil/fil0fil.cc
View file @
40bae98c
...
...
@@ -4857,7 +4857,7 @@ fil_load_single_table_tablespace(
/* Check for a link file which locates a remote tablespace. */
remote
.
success
=
fil_open_linked_file
(
remote
.
success
=
(
IS_XTRABACKUP
()
&&
!
srv_backup_mode
)
?
0
:
fil_open_linked_file
(
tablename
,
&
remote
.
filepath
,
&
remote
.
file
,
FALSE
);
/* Read the first page of the remote tablespace */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment