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
adbab0d4
Commit
adbab0d4
authored
Jun 26, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13625: Add the test innodb.innodb-wl5980-debug
parent
10ebdb7f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
0 deletions
+88
-0
mysql-test/suite/innodb/r/innodb-wl5980-debug.result
mysql-test/suite/innodb/r/innodb-wl5980-debug.result
+27
-0
mysql-test/suite/innodb/t/innodb-wl5980-debug.test
mysql-test/suite/innodb/t/innodb-wl5980-debug.test
+51
-0
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+5
-0
storage/xtradb/fil/fil0fil.cc
storage/xtradb/fil/fil0fil.cc
+5
-0
No files found.
mysql-test/suite/innodb/r/innodb-wl5980-debug.result
0 → 100644
View file @
adbab0d4
call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache");
call mtr.add_suppression("Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'.");
#
# WL5980 Remote tablespace debug error injection tests.
#
CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir' ;
INSERT INTO t1 VALUES (1, 'tablespace');
SELECT * FROM t1;
a b
1 tablespace
#
# Test the second injection point in fil_rename_tablespace().
# Make sure the table is useable after this failure.
#
SET @save_dbug=@@debug_dbug;
SET debug_dbug="+d,fil_rename_tablespace_failure_2";
RENAME TABLE t1 TO t2;
SET debug_dbug=@save_dbug;
INSERT INTO t1 VALUES (2, 'tablespace');
SELECT * FROM t1;
a b
1 tablespace
2 tablespace
#
# Cleanup
#
DROP TABLE t1;
mysql-test/suite/innodb/t/innodb-wl5980-debug.test
0 → 100644
View file @
adbab0d4
#
# This testcase is to check the various debug injection points
# to make sure error conditions react corectly and acheive
# better code coverage.
#
# Not supported in embedded
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_innodb
.
inc
# These messages are expected in the log
call
mtr
.
add_suppression
(
"Cannot find space id [0-9]+ in the tablespace memory cache"
);
call
mtr
.
add_suppression
(
"Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'."
);
# Set up some variables
LET
$MYSQL_DATA_DIR
=
`select @@datadir`
;
LET
$data_directory_clause
=
DATA
DIRECTORY
=
'$MYSQL_TMP_DIR/alt_dir'
;
--
enable_query_log
--
echo
#
--
echo
# WL5980 Remote tablespace debug error injection tests.
--
echo
#
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
eval
CREATE
TABLE
t1
(
a
int
KEY
,
b
text
)
ENGINE
=
Innodb
$data_directory_clause
;
INSERT
INTO
t1
VALUES
(
1
,
'tablespace'
);
SELECT
*
FROM
t1
;
--
echo
#
--
echo
# Test the second injection point in fil_rename_tablespace().
--
echo
# Make sure the table is useable after this failure.
--
echo
#
SET
@
save_dbug
=@@
debug_dbug
;
SET
debug_dbug
=
"+d,fil_rename_tablespace_failure_2"
;
--
disable_result_log
--
error
ER_ERROR_ON_RENAME
RENAME
TABLE
t1
TO
t2
;
--
enable_result_log
SET
debug_dbug
=@
save_dbug
;
INSERT
INTO
t1
VALUES
(
2
,
'tablespace'
);
SELECT
*
FROM
t1
;
--
echo
#
--
echo
# Cleanup
--
echo
#
DROP
TABLE
t1
;
--
rmdir
$MYSQL_TMP_DIR
/
alt_dir
/
test
--
rmdir
$MYSQL_TMP_DIR
/
alt_dir
storage/innobase/fil/fil0fil.cc
View file @
adbab0d4
...
...
@@ -3216,8 +3216,13 @@ fil_rename_tablespace(
space
,
node
,
new_name
,
new_path
);
if
(
success
)
{
DBUG_EXECUTE_IF
(
"fil_rename_tablespace_failure_2"
,
goto
skip_second_rename
;
);
success
=
os_file_rename
(
innodb_file_data_key
,
old_path
,
new_path
);
DBUG_EXECUTE_IF
(
"fil_rename_tablespace_failure_2"
,
skip_second_rename:
success
=
FALSE
;
);
if
(
!
success
)
{
/* We have to revert the changes we made
...
...
storage/xtradb/fil/fil0fil.cc
View file @
adbab0d4
...
...
@@ -3262,8 +3262,13 @@ fil_rename_tablespace(
space
,
node
,
new_name
,
new_path
);
if
(
success
)
{
DBUG_EXECUTE_IF
(
"fil_rename_tablespace_failure_2"
,
goto
skip_second_rename
;
);
success
=
os_file_rename
(
innodb_file_data_key
,
old_path
,
new_path
);
DBUG_EXECUTE_IF
(
"fil_rename_tablespace_failure_2"
,
skip_second_rename:
success
=
FALSE
;
);
if
(
!
success
)
{
/* We have to revert the changes we made
...
...
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