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
474f5171
Commit
474f5171
authored
Sep 08, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge bb-10.2-ext into 10.3
parents
e022dde3
fb14761d
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
596 additions
and
557 deletions
+596
-557
extra/mariabackup/xtrabackup.cc
extra/mariabackup/xtrabackup.cc
+172
-528
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+0
-15
mysql-test/suite/encryption/r/innodb_encrypt_log.result
mysql-test/suite/encryption/r/innodb_encrypt_log.result
+1
-1
mysql-test/suite/encryption/t/innodb_encrypt_log.test
mysql-test/suite/encryption/t/innodb_encrypt_log.test
+1
-1
mysql-test/suite/innodb/r/alter_crash.result
mysql-test/suite/innodb/r/alter_crash.result
+149
-0
mysql-test/suite/innodb/t/alter_crash.opt
mysql-test/suite/innodb/t/alter_crash.opt
+1
-0
mysql-test/suite/innodb/t/alter_crash.test
mysql-test/suite/innodb/t/alter_crash.test
+228
-0
mysql-test/suite/mariabackup/disabled.def
mysql-test/suite/mariabackup/disabled.def
+1
-2
mysql-test/suite/mariabackup/partial.result
mysql-test/suite/mariabackup/partial.result
+6
-0
mysql-test/suite/mariabackup/partial.test
mysql-test/suite/mariabackup/partial.test
+16
-2
mysql-test/suite/mariabackup/xb_page_compress.test
mysql-test/suite/mariabackup/xb_page_compress.test
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+5
-0
storage/innobase/row/row0quiesce.cc
storage/innobase/row/row0quiesce.cc
+9
-7
storage/innobase/trx/trx0undo.cc
storage/innobase/trx/trx0undo.cc
+6
-0
No files found.
extra/mariabackup/xtrabackup.cc
View file @
474f5171
This diff is collapsed.
Click to expand it.
mysql-test/mysql-test-run.pl
View file @
474f5171
...
@@ -5044,13 +5044,6 @@ sub mysqld_start ($$) {
...
@@ -5044,13 +5044,6 @@ sub mysqld_start ($$) {
$path_vardir_trace
,
$mysqld
->
name
());
$path_vardir_trace
,
$mysqld
->
name
());
}
}
if
(
IS_WINDOWS
)
{
# Trick the server to send output to stderr, with --console
if
(
!
(
grep
(
/^--log-error/
,
@$args
)))
{
mtr_add_arg
(
$args
,
"
--console
");
}
}
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
# Use it to restart the server at testing a failing server start (e.g
# Use it to restart the server at testing a failing server start (e.g
...
@@ -5514,14 +5507,6 @@ sub start_mysqltest ($) {
...
@@ -5514,14 +5507,6 @@ sub start_mysqltest ($) {
my
$extra_opts
=
get_extra_opts
(
$mysqld
,
$tinfo
);
my
$extra_opts
=
get_extra_opts
(
$mysqld
,
$tinfo
);
mysqld_arguments
(
$mysqld_args
,
$mysqld
,
$extra_opts
);
mysqld_arguments
(
$mysqld_args
,
$mysqld
,
$extra_opts
);
mtr_add_arg
(
$args
,
"
--server-arg=%s
",
$_
)
for
@$mysqld_args
;
mtr_add_arg
(
$args
,
"
--server-arg=%s
",
$_
)
for
@$mysqld_args
;
if
(
IS_WINDOWS
)
{
# Trick the server to send output to stderr, with --console
if
(
!
(
grep
(
/^--server-arg=--log-error/
,
@$args
)))
{
mtr_add_arg
(
$args
,
"
--server-arg=--console
");
}
}
}
}
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
...
mysql-test/suite/encryption/r/innodb_encrypt_log.result
View file @
474f5171
...
@@ -50,7 +50,7 @@ INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
...
@@ -50,7 +50,7 @@ INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
# ib_logfile0 expecting NOT FOUND
# ib_logfile0 expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)/ in ib_logfile0
# ib_logfile0 expecting FOUND
# ib_logfile0 expecting FOUND
FOUND
3 /public|gossip
/ in ib_logfile0
FOUND
1 /(public|gossip).*
/ in ib_logfile0
# ibdata1 expecting NOT FOUND
# ibdata1 expecting NOT FOUND
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
NOT FOUND /private|secret|sacr(ed|ament)|success|story|secur(e|ity)|public|gossip/ in ibdata1
# t0.ibd expecting NOT FOUND
# t0.ibd expecting NOT FOUND
...
...
mysql-test/suite/encryption/t/innodb_encrypt_log.test
View file @
474f5171
...
@@ -75,7 +75,7 @@ INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
...
@@ -75,7 +75,7 @@ INSERT INTO t0 VALUES(NULL, 5, 5, 'public', 'gossip');
--
echo
# ib_logfile0 expecting NOT FOUND
--
echo
# ib_logfile0 expecting NOT FOUND
--
let
SEARCH_FILE
=
$MYSQLD_DATADIR
/
ib_logfile0
--
let
SEARCH_FILE
=
$MYSQLD_DATADIR
/
ib_logfile0
--
source
include
/
search_pattern_in_file
.
inc
--
source
include
/
search_pattern_in_file
.
inc
--
let
SEARCH_PATTERN
=
public
|
gossip
--
let
SEARCH_PATTERN
=
(
public
|
gossip
)
.*
--
echo
# ib_logfile0 expecting FOUND
--
echo
# ib_logfile0 expecting FOUND
--
let
SEARCH_FILE
=
$MYSQLD_DATADIR
/
ib_logfile0
--
let
SEARCH_FILE
=
$MYSQLD_DATADIR
/
ib_logfile0
--
source
include
/
search_pattern_in_file
.
inc
--
source
include
/
search_pattern_in_file
.
inc
...
...
mysql-test/suite/innodb/r/alter_crash.result
0 → 100644
View file @
474f5171
#
# Bug#20015132 ALTER TABLE FAILS TO CHECK IF TABLE IS CORRUPTED
#
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 CHAR(1), c3 INT UNSIGNED) ENGINE=InnoDB;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_create_table_fail_too_many_trx';
ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
ERROR HY000: Too many active concurrent transactions
SET DEBUG_DBUG=@saved_debug_dbug;
ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
SET DEBUG_DBUG='+d,dict_set_index_corrupted';
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted
test.t1 check Warning InnoDB: Index c3 is marked as corrupted
test.t1 check error Corrupt
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c2 is marked as corrupted
test.t1 check Warning InnoDB: Index c3 is marked as corrupted
test.t1 check error Corrupt
ALTER TABLE t1 DROP INDEX c2;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index c3 is marked as corrupted
test.t1 check error Corrupt
ALTER TABLE t1 ADD INDEX (c2,c3);
ERROR HY000: Index c3 is corrupted
ALTER TABLE t1 CHANGE c3 c3 INT NOT NULL;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 ADD INDEX (c2,c3);
DROP TABLE t1;
#
# Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
#
# -- Scenario 1:
# Crash the server in ha_innobase::commit_inplace_alter_table()
# just after committing the dictionary changes.
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
INSERT INTO t1 VALUES (1,2),(3,4);
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
# Manual *.frm recovery begin.
# Manual recovery end
FLUSH TABLES;
# Drop the orphaned original table.
# Files in datadir after manual recovery.
t1.frm
t1.ibd
SHOW TABLES;
Tables_in_test
t1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL,
PRIMARY KEY (`f2`,`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (5,6),(7,8);
SELECT * FROM t1;
f1 f2
1 2
3 4
5 6
7 8
DROP TABLE t1;
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
DROP TABLE t1;
# -- Scenario 2:
# Crash the server in ha_innobase::commit_inplace_alter_table()
# just before committing the dictionary changes, but after
# writing the MLOG_FILE_RENAME records. As the mini-transaction
# is not committed, the renames will not be replayed.
CREATE TABLE t2 (f1 int not null, f2 int not null) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,2),(3,4);
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Startup the server after the crash
# Read and remember the temporary table name
# Manual *.frm recovery begin. The dictionary was not updated
# and the files were not renamed. The rebuilt table
# was left behind on purpose, to faciliate data recovery.
# Manual recovery end
# Drop the orphaned rebuilt table.
SHOW TABLES;
Tables_in_test
t2
INSERT INTO t2 VALUES (5,6),(7,8);
SELECT * from t2;
f1 f2
1 2
3 4
5 6
7 8
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f1` int(11) NOT NULL,
`f2` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
DROP TABLE t2;
# -------------------------
# End of Testing Scenario 2
# -------------------------
#
# Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
# DATA DICTIONARY INCONSISTENCY
#
CREATE TABLE t1(a int PRIMARY KEY, b varchar(255), c int NOT NULL)
ENGINE=InnoDB;
INSERT INTO t1 SET a=1,c=2;
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
ERROR HY000: Lost connection to MySQL server during query
# Restart mysqld after the crash and reconnect.
# Manual *.frm recovery begin.
# Manual recovery end
FLUSH TABLES;
# Drop the orphaned original table.
# Files in datadir after manual recovery.
t1.frm
t1.ibd
SHOW TABLES;
Tables_in_test
t1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(255) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
UPDATE t1 SET d=NULL;
SELECT * FROM t1;
a b d
1 NULL NULL
DROP TABLE t1;
mysql-test/suite/innodb/t/alter_crash.opt
0 → 100644
View file @
474f5171
--loose-innodb-sys-tables
mysql-test/suite/innodb/t/alter_crash.test
0 → 100644
View file @
474f5171
# Crash-safe InnoDB ALTER operations
--
source
include
/
not_valgrind
.
inc
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
not_crashrep
.
inc
--
disable_query_log
call
mtr
.
add_suppression
(
'InnoDB: cannot find a free slot for an undo log'
);
call
mtr
.
add_suppression
(
'InnoDB: row_merge_rename_index_to_add failed with error 47'
);
call
mtr
.
add_suppression
(
'InnoDB: Flagged corruption of `c[23]`'
);
call
mtr
.
add_suppression
(
'InnoDB: Index `c[23]` .*is corrupted'
);
--
enable_query_log
--
echo
#
--
echo
# Bug#20015132 ALTER TABLE FAILS TO CHECK IF TABLE IS CORRUPTED
--
echo
#
CREATE
TABLE
t1
(
c1
INT
PRIMARY
KEY
,
c2
CHAR
(
1
),
c3
INT
UNSIGNED
)
ENGINE
=
InnoDB
;
SET
@
saved_debug_dbug
=
@@
SESSION
.
debug_dbug
;
SET
DEBUG_DBUG
=
'+d,ib_create_table_fail_too_many_trx'
;
--
error
ER_TOO_MANY_CONCURRENT_TRXS
ALTER
TABLE
t1
ADD
INDEX
(
c2
),
ADD
INDEX
(
c3
);
SET
DEBUG_DBUG
=@
saved_debug_dbug
;
ALTER
TABLE
t1
ADD
INDEX
(
c2
),
ADD
INDEX
(
c3
);
# Flag the secondary indexes corrupted.
SET
DEBUG_DBUG
=
'+d,dict_set_index_corrupted'
;
CHECK
TABLE
t1
;
# Ensure that the corruption is permanent.
--
source
include
/
restart_mysqld
.
inc
CHECK
TABLE
t1
;
ALTER
TABLE
t1
DROP
INDEX
c2
;
CHECK
TABLE
t1
;
# We refuse an ALTER TABLE that would modify the InnoDB data dictionary
# while leaving some of the table corrupted.
--
error
ER_INDEX_CORRUPT
ALTER
TABLE
t1
ADD
INDEX
(
c2
,
c3
);
# This will rebuild the table, uncorrupting all secondary indexes.
ALTER
TABLE
t1
CHANGE
c3
c3
INT
NOT
NULL
;
CHECK
TABLE
t1
;
ALTER
TABLE
t1
ADD
INDEX
(
c2
,
c3
);
DROP
TABLE
t1
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
let
datadir
=
`select @@datadir`
;
# These are from include/shutdown_mysqld.inc and allow to call start_mysqld.inc
--
let
$_server_id
=
`SELECT @@server_id`
--
let
$_expect_file_name
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
$_server_id
.
expect
--
echo
#
--
echo
# Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
--
echo
#
--
echo
# -- Scenario 1:
--
echo
# Crash the server in ha_innobase::commit_inplace_alter_table()
--
echo
# just after committing the dictionary changes.
CREATE
TABLE
t1
(
f1
INT
NOT
NULL
,
f2
INT
NOT
NULL
)
ENGINE
=
innodb
;
INSERT
INTO
t1
VALUES
(
1
,
2
),(
3
,
4
);
SET
DEBUG_DBUG
=
'+d,innodb_alter_commit_crash_after_commit'
;
let
$orig_table_id
=
`SELECT table_id
FROM information_schema.innodb_sys_tables
WHERE name = 'test/t1'`
;
# Write file to make mysql-test-run.pl expect crash
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
error
2013
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
f2
,
f1
);
--
echo
# Restart mysqld after the crash and reconnect.
--
source
include
/
start_mysqld
.
inc
let
$temp_table_name
=
`SELECT SUBSTR(name, 6)
FROM information_schema.innodb_sys_tables
WHERE table_id = $orig_table_id`
;
--
echo
# Manual *.frm recovery begin.
--
move_file
$MYSQLD_DATADIR
/
test
/
t1
.
frm
$MYSQLD_DATADIR
/
test
/
$temp_table_name
.
frm
perl
;
my
@
frm_file
=
glob
"
$ENV
{
'datadir'
}
/test/#sql-*.frm"
;
my
$t1_frm
=
"
$ENV
{
'datadir'
}
/test/t1.frm"
;
rename
(
$frm_file
[
0
],
$t1_frm
);
EOF
--
echo
# Manual recovery end
FLUSH
TABLES
;
--
echo
# Drop the orphaned original table.
--
disable_query_log
eval
DROP
TABLE
`#mysql50#$temp_table_name`
;
--
enable_query_log
--
echo
# Files in datadir after manual recovery.
--
list_files
$MYSQLD_DATADIR
/
test
SHOW
TABLES
;
SHOW
CREATE
TABLE
t1
;
INSERT
INTO
t1
VALUES
(
5
,
6
),(
7
,
8
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
f1
INT
NOT
NULL
,
f2
INT
NOT
NULL
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
f2
,
f1
);
DROP
TABLE
t1
;
--
echo
# -- Scenario 2:
--
echo
# Crash the server in ha_innobase::commit_inplace_alter_table()
--
echo
# just before committing the dictionary changes, but after
--
echo
# writing the MLOG_FILE_RENAME records. As the mini-transaction
--
echo
# is not committed, the renames will not be replayed.
CREATE
TABLE
t2
(
f1
int
not
null
,
f2
int
not
null
)
ENGINE
=
InnoDB
;
INSERT
INTO
t2
VALUES
(
1
,
2
),(
3
,
4
);
SET
DEBUG_DBUG
=
'+d,innodb_alter_commit_crash_before_commit'
;
let
$orig_table_id
=
`SELECT table_id
FROM information_schema.innodb_sys_tables
WHERE name = 'test/t2'`
;
# Write file to make mysql-test-run.pl expect crash
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
error
2013
ALTER
TABLE
t2
ADD
PRIMARY
KEY
(
f2
,
f1
);
--
echo
# Startup the server after the crash
--
source
include
/
start_mysqld
.
inc
--
echo
# Read and remember the temporary table name
let
$temp_table_name
=
`SELECT SUBSTRING(name,6)
FROM information_schema.innodb_sys_tables
WHERE name LIKE "test/#sql-ib$orig_table_id%"`
;
# This second copy is an environment variable for the perl script below.
let
temp_table_name
=
$temp_table_name
;
--
echo
# Manual *.frm recovery begin. The dictionary was not updated
--
echo
# and the files were not renamed. The rebuilt table
--
echo
# was left behind on purpose, to faciliate data recovery.
perl
;
my
@
frm_file
=
glob
"
$ENV
{
'datadir'
}
/test/#sql-*.frm"
;
my
$target_frm
=
"
$ENV
{
'datadir'}/test/$ENV{'temp_table_name'
}
.frm"
;
rename
(
$frm_file
[
0
],
$target_frm
);
EOF
--
echo
# Manual recovery end
--
echo
# Drop the orphaned rebuilt table.
--
disable_query_log
eval
DROP
TABLE
`#mysql50#$temp_table_name`
;
--
enable_query_log
SHOW
TABLES
;
INSERT
INTO
t2
VALUES
(
5
,
6
),(
7
,
8
);
SELECT
*
from
t2
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
;
CREATE
TABLE
t2
(
f1
INT
NOT
NULL
,
f2
INT
NOT
NULL
)
ENGINE
=
InnoDB
;
ALTER
TABLE
t2
ADD
PRIMARY
KEY
(
f2
,
f1
);
DROP
TABLE
t2
;
--
list_files
$MYSQLD_DATADIR
/
test
--
echo
# -------------------------
--
echo
# End of Testing Scenario 2
--
echo
# -------------------------
--
echo
#
--
echo
# Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
--
echo
# DATA DICTIONARY INCONSISTENCY
--
echo
#
CREATE
TABLE
t1
(
a
int
PRIMARY
KEY
,
b
varchar
(
255
),
c
int
NOT
NULL
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
SET
a
=
1
,
c
=
2
;
SET
DEBUG_DBUG
=
'+d,innodb_alter_commit_crash_after_commit'
;
let
$orig_table_id
=
`select table_id from
information_schema.innodb_sys_tables where name = 'test/t1'`
;
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
# Write file to make mysql-test-run.pl expect crash
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
#
--
error
2013
ALTER
TABLE
t1
ADD
INDEX
(
b
),
CHANGE
c
d
int
,
ALGORITHM
=
INPLACE
;
--
echo
# Restart mysqld after the crash and reconnect.
--
source
include
/
start_mysqld
.
inc
let
$temp_table_name
=
`SELECT SUBSTR(name, 6)
FROM information_schema.innodb_sys_tables
WHERE table_id = $orig_table_id`
;
--
echo
# Manual *.frm recovery begin.
--
move_file
$MYSQLD_DATADIR
/
test
/
t1
.
frm
$MYSQLD_DATADIR
/
test
/
$temp_table_name
.
frm
perl
;
my
@
frm_file
=
glob
"
$ENV
{
'datadir'
}
/test/#sql-*.frm"
;
my
$t1_frm
=
"
$ENV
{
'datadir'
}
/test/t1.frm"
;
rename
(
$frm_file
[
0
],
$t1_frm
);
EOF
--
echo
# Manual recovery end
FLUSH
TABLES
;
--
echo
# Drop the orphaned original table.
--
disable_query_log
eval
DROP
TABLE
`#mysql50#$temp_table_name`
;
--
enable_query_log
--
echo
# Files in datadir after manual recovery.
--
list_files
$MYSQLD_DATADIR
/
test
SHOW
TABLES
;
SHOW
CREATE
TABLE
t1
;
UPDATE
t1
SET
d
=
NULL
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
mysql-test/suite/mariabackup/disabled.def
View file @
474f5171
partial : xtrabackup --export does not work
xb_page_compress : xtrabackup --export does not work
mysql-test/suite/mariabackup/partial.result
View file @
474f5171
CREATE TABLE t1(i INT) ENGINE INNODB;
CREATE TABLE t1(i INT) ENGINE INNODB;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(1);
CREATE TABLE t21(i INT) ENGINE INNODB;
INSERT INTO t21 VALUES(1);
CREATE TABLE t2(i int) ENGINE INNODB;
CREATE TABLE t2(i int) ENGINE INNODB;
# xtrabackup backup
# xtrabackup backup
t1.ibd
t1.ibd
t21.ibd
# xtrabackup prepare
# xtrabackup prepare
t1.cfg
t21.cfg
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 IMPORT TABLESPACE;
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
SELECT * FROM t1;
...
@@ -11,3 +16,4 @@ i
...
@@ -11,3 +16,4 @@ i
1
1
DROP TABLE t1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t2;
DROP TABLE t21;
mysql-test/suite/mariabackup/partial.test
View file @
474f5171
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
CREATE
TABLE
t1
(
i
INT
)
ENGINE
INNODB
;
CREATE
TABLE
t1
(
i
INT
)
ENGINE
INNODB
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
CREATE
TABLE
t21
(
i
INT
)
ENGINE
INNODB
;
INSERT
INTO
t21
VALUES
(
1
);
CREATE
TABLE
t2
(
i
int
)
ENGINE
INNODB
;
CREATE
TABLE
t2
(
i
int
)
ENGINE
INNODB
;
echo
# xtrabackup backup;
echo
# xtrabackup backup;
...
@@ -15,13 +18,23 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=te
...
@@ -15,13 +18,23 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=te
--
enable_result_log
--
enable_result_log
list_files
$targetdir
/
test
*.
ibd
;
list_files
$targetdir
/
test
*.
ibd
;
# Inject a junk .ibd file into backup dir to
# see if prepare does not choke on it.
write_file
$targetdir
/
test
/
junk
.
ibd
;
EOF
write_file
$targetdir
/
test
/
junk
.
frm
;
EOF
echo
# xtrabackup prepare;
echo
# xtrabackup prepare;
--
disable_result_log
--
disable_result_log
exec
$XTRABACKUP
--
prepare
--
export
--
target
-
dir
=
$targetdir
;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
defaults
-
group
-
suffix
=.
1
--
prepare
--
export
--
target
-
dir
=
$targetdir
;
--
enable_result_log
--
enable_result_log
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
list_files
$targetdir
/
test
*.
cfg
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
copy_file
$targetdir
/
test
/
t1
.
ibd
$MYSQLD_DATADIR
/
test
/
t1
.
ibd
;
copy_file
$targetdir
/
test
/
t1
.
ibd
$MYSQLD_DATADIR
/
test
/
t1
.
ibd
;
copy_file
$targetdir
/
test
/
t1
.
cfg
$MYSQLD_DATADIR
/
test
/
t1
.
cfg
;
copy_file
$targetdir
/
test
/
t1
.
cfg
$MYSQLD_DATADIR
/
test
/
t1
.
cfg
;
ALTER
TABLE
t1
IMPORT
TABLESPACE
;
ALTER
TABLE
t1
IMPORT
TABLESPACE
;
...
@@ -29,4 +42,5 @@ ALTER TABLE t1 IMPORT TABLESPACE;
...
@@ -29,4 +42,5 @@ ALTER TABLE t1 IMPORT TABLESPACE;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t2
;
DROP
TABLE
t21
;
rmdir
$targetdir
;
rmdir
$targetdir
;
mysql-test/suite/mariabackup/xb_page_compress.test
View file @
474f5171
...
@@ -29,7 +29,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
...
@@ -29,7 +29,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--
disable_result_log
--
disable_result_log
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
"--tables=test.*1"
--
target
-
dir
=
$targetdir
;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
backup
"--tables=test.*1"
--
target
-
dir
=
$targetdir
;
echo
# xtrabackup prepare;
echo
# xtrabackup prepare;
exec
$XTRABACKUP
--
prepare
--
export
--
target
-
dir
=
$targetdir
;
exec
$XTRABACKUP
--
defaults
-
file
=
$MYSQLTEST_VARDIR
/
my
.
cnf
--
defaults
-
group
-
suffix
=.
1
--
prepare
--
export
--
target
-
dir
=
$targetdir
;
--
enable_result_log
--
enable_result_log
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
...
...
sql/mysqld.cc
View file @
474f5171
...
@@ -5044,6 +5044,11 @@ static int init_server_components()
...
@@ -5044,6 +5044,11 @@ static int init_server_components()
help information. Since the implementation of plugin server
help information. Since the implementation of plugin server
variables the help output is now written much later.
variables the help output is now written much later.
*/
*/
#ifdef _WIN32
if
(
opt_console
)
opt_error_log
=
false
;
#endif
if
(
opt_error_log
&&
!
opt_abort
)
if
(
opt_error_log
&&
!
opt_abort
)
{
{
if
(
!
log_error_file_ptr
[
0
])
if
(
!
log_error_file_ptr
[
0
])
...
...
storage/innobase/row/row0quiesce.cc
View file @
474f5171
...
@@ -589,16 +589,18 @@ row_quiesce_table_complete(
...
@@ -589,16 +589,18 @@ row_quiesce_table_complete(
++
count
;
++
count
;
}
}
/* Remove the .cfg file now that the user has resumed
if
(
!
opt_bootstrap
)
{
normal operations. Otherwise it will cause problems when
/* Remove the .cfg file now that the user has resumed
the user tries to drop the database (remove directory). */
normal operations. Otherwise it will cause problems when
char
cfg_name
[
OS_FILE_MAX_PATH
];
the user tries to drop the database (remove directory). */
char
cfg_name
[
OS_FILE_MAX_PATH
];
srv_get_meta_data_filename
(
table
,
cfg_name
,
sizeof
(
cfg_name
));
srv_get_meta_data_filename
(
table
,
cfg_name
,
sizeof
(
cfg_name
));
os_file_delete_if_exists
(
innodb_data_file_key
,
cfg_name
,
NULL
);
os_file_delete_if_exists
(
innodb_data_file_key
,
cfg_name
,
NULL
);
ib
::
info
()
<<
"Deleting the meta-data file '"
<<
cfg_name
<<
"'"
;
ib
::
info
()
<<
"Deleting the meta-data file '"
<<
cfg_name
<<
"'"
;
}
if
(
trx_purge_state
()
!=
PURGE_STATE_DISABLED
)
{
if
(
trx_purge_state
()
!=
PURGE_STATE_DISABLED
)
{
trx_purge_run
();
trx_purge_run
();
...
...
storage/innobase/trx/trx0undo.cc
View file @
474f5171
...
@@ -1507,6 +1507,12 @@ trx_undo_assign_undo(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo)
...
@@ -1507,6 +1507,12 @@ trx_undo_assign_undo(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo)
mutex_enter
(
&
rseg
->
mutex
);
mutex_enter
(
&
rseg
->
mutex
);
DBUG_EXECUTE_IF
(
"ib_create_table_fail_too_many_trx"
,
err
=
DB_TOO_MANY_CONCURRENT_TRXS
;
goto
func_exit
;
);
*
undo
=
trx_undo_reuse_cached
(
trx
,
rseg
,
trx
->
id
,
trx
->
xid
,
&
mtr
);
*
undo
=
trx_undo_reuse_cached
(
trx
,
rseg
,
trx
->
id
,
trx
->
xid
,
&
mtr
);
if
(
*
undo
==
NULL
)
{
if
(
*
undo
==
NULL
)
{
err
=
trx_undo_create
(
trx
,
rseg
,
trx
->
id
,
trx
->
xid
,
err
=
trx_undo_create
(
trx
,
rseg
,
trx
->
id
,
trx
->
xid
,
...
...
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