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
69e88de0
Commit
69e88de0
authored
Dec 20, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14585: Adjust the innodb.alter_crash test case
parent
b4165985
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
33 deletions
+16
-33
mysql-test/suite/innodb/r/alter_crash.result
mysql-test/suite/innodb/r/alter_crash.result
+1
-3
mysql-test/suite/innodb/t/alter_crash.test
mysql-test/suite/innodb/t/alter_crash.test
+15
-30
No files found.
mysql-test/suite/innodb/r/alter_crash.result
View file @
69e88de0
...
...
@@ -83,9 +83,8 @@ ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Startup the server after the crash
SELECT * FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test/#sql-
ib
%';
WHERE name LIKE 'test/#sql-%';
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# Drop the orphaned rebuilt table.
SHOW TABLES;
Tables_in_test
t2
...
...
@@ -123,7 +122,6 @@ ERROR HY000: Lost connection to MySQL server during query
SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
FLUSH TABLES;
# Files in datadir after manual recovery.
t1.frm
t1.ibd
...
...
mysql-test/suite/innodb/t/alter_crash.test
View file @
69e88de0
...
...
@@ -72,9 +72,6 @@ let $orig_table_id = `SELECT table_id
--
error
2013
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
f2
,
f1
);
--
echo
# Restart mysqld after the crash and reconnect.
--
source
include
/
start_mysqld
.
inc
let
TABLENAME_INC
=
$MYSQLTEST_VARDIR
/
tmp
/
tablename
.
inc
;
perl
;
die
unless
open
OUT
,
">
$ENV
{
TABLENAME_INC
}
"
;
...
...
@@ -86,12 +83,15 @@ EOF
source
$TABLENAME_INC
;
remove_file
$TABLENAME_INC
;
move_file
$datadir
/
test
/
$tablename
.
frm
$datadir
/
test
/
t1
.
frm
;
--
echo
# Restart mysqld after the crash and reconnect.
--
source
include
/
start_mysqld
.
inc
--
replace_result
$orig_table_id
ID
eval
SELECT
*
FROM
information_schema
.
innodb_sys_tables
WHERE
table_id
=
$orig_table_id
;
move_file
$datadir
/
test
/
$tablename
.
frm
$datadir
/
test
/
t1
.
frm
;
--
echo
# Files in datadir after manual recovery.
--
list_files
$MYSQLD_DATADIR
/
test
...
...
@@ -125,26 +125,13 @@ let $orig_table_id = `SELECT table_id
--
error
2013
ALTER
TABLE
t2
ADD
PRIMARY
KEY
(
f2
,
f1
);
remove_files_wildcard
$datadir
/
test
#sql-*.frm;
--
echo
# Startup the server after the crash
--
source
include
/
start_mysqld
.
inc
SELECT
*
FROM
information_schema
.
innodb_sys_tables
WHERE
name
LIKE
'test/#sql-ib%'
;
perl
;
die
unless
open
OUT
,
">
$ENV
{
TABLENAME_INC
}
"
;
chdir
"
$ENV
{
'datadir'
}
/test"
;
my
@
frm_file
=
map
{
substr
(
$_
,
0
,
-
4
)
}
glob
"#sql-*.frm"
;
print
OUT
'let $tablename='
,
$frm_file
[
0
],
';'
;
close
OUT
or
die
;
EOF
source
$TABLENAME_INC
;
remove_file
$TABLENAME_INC
;
--
echo
# Drop the orphaned rebuilt table.
--
disable_query_log
eval
DROP
TABLE
`#mysql50#$tablename`
;
--
enable_query_log
WHERE
name
LIKE
'test/#sql-%'
;
SHOW
TABLES
;
INSERT
INTO
t2
VALUES
(
5
,
6
),(
7
,
8
);
...
...
@@ -180,13 +167,6 @@ let $orig_table_id = `select table_id from
--
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
--
replace_result
$orig_table_id
ID
eval
SELECT
*
FROM
information_schema
.
innodb_sys_tables
WHERE
table_id
=
$orig_table_id
;
perl
;
die
unless
open
OUT
,
">
$ENV
{
TABLENAME_INC
}
"
;
chdir
"
$ENV
{
'datadir'
}
/test"
;
...
...
@@ -194,12 +174,17 @@ my @frm_file = map { substr($_, 0, -4) } glob "#sql-*.frm";
print
OUT
'let $tablename='
,
$frm_file
[
0
],
';'
;
close
OUT
or
die
;
EOF
source
$TABLENAME_INC
;
remove_file
$TABLENAME_INC
;
move_file
$datadir
/
test
/
$tablename
.
frm
$datadir
/
test
/
t1
.
frm
;
FLUSH
TABLES
;
--
echo
# Restart mysqld after the crash and reconnect.
--
source
include
/
start_mysqld
.
inc
--
replace_result
$orig_table_id
ID
eval
SELECT
*
FROM
information_schema
.
innodb_sys_tables
WHERE
table_id
=
$orig_table_id
;
--
echo
# Files in datadir after manual recovery.
--
list_files
$MYSQLD_DATADIR
/
test
...
...
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