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
6a4f8a8d
Commit
6a4f8a8d
authored
Feb 01, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the parts testsuite to work with mtr2
parent
299339d4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
43 deletions
+55
-43
mysql-test/suite/parts/inc/partition_layout_check1.inc
mysql-test/suite/parts/inc/partition_layout_check1.inc
+1
-1
mysql-test/suite/parts/inc/partition_layout_check2.inc
mysql-test/suite/parts/inc/partition_layout_check2.inc
+1
-1
mysql-test/suite/parts/r/rpl_partition.result
mysql-test/suite/parts/r/rpl_partition.result
+16
-12
mysql-test/suite/parts/t/partition_recover_myisam.test
mysql-test/suite/parts/t/partition_recover_myisam.test
+2
-0
mysql-test/suite/parts/t/partition_repair_myisam.test
mysql-test/suite/parts/t/partition_repair_myisam.test
+31
-29
mysql-test/suite/parts/t/rpl_partition.test
mysql-test/suite/parts/t/rpl_partition.test
+4
-0
No files found.
mysql-test/suite/parts/inc/partition_layout_check1.inc
View file @
6a4f8a8d
...
...
@@ -36,7 +36,7 @@ let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
# the corresponding SELECT on the INFORMATION_SCHEMA
# - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT
let
$show_file
=
$MYSQLD_DATADIR
/
test
/
tmp1
;
--
exec
echo
"SHOW CREATE TABLE t1;
"
|
$MYSQL_TEST
>
$show_file
2
>&
1
||
true
--
exec
echo
"SHOW CREATE TABLE t1;
exit; "
|
$MYSQL_TEST
>
$show_file
2
>&
1
if
(
$do_file_tests
)
{
# List the files belonging to the table t1
...
...
mysql-test/suite/parts/inc/partition_layout_check2.inc
View file @
6a4f8a8d
...
...
@@ -30,7 +30,7 @@ let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
# Dump the current definition of the table t1 to tmp1
let
$show_file
=
$MYSQLD_DATADIR
/
test
/
tmp1
;
--
exec
echo
"SHOW CREATE TABLE t1;
"
|
$MYSQL_TEST
>
$show_file
2
>&
1
||
true
--
exec
echo
"SHOW CREATE TABLE t1;
exit; "
|
$MYSQL_TEST
>
$show_file
2
>&
1
if
(
$do_file_tests
)
{
...
...
mysql-test/suite/parts/r/rpl_partition.result
View file @
6a4f8a8d
...
...
@@ -4,6 +4,8 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set @old_global_binlog_format= @@global.binlog_format;
set @old_session_binlog_format= @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
...
...
@@ -121,21 +123,21 @@ Create Table CREATE TABLE `t3` (
`fkid` mediumint(9) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=
MyISAM
AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1
) ENGINE=
InnoDB
AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (id)
SUBPARTITION BY HASH (id)
SUBPARTITIONS 2
(PARTITION pa1 VALUES LESS THAN (10) ENGINE =
MyISAM
,
PARTITION pa2 VALUES LESS THAN (20) ENGINE =
MyISAM
,
PARTITION pa3 VALUES LESS THAN (30) ENGINE =
MyISAM
,
PARTITION pa4 VALUES LESS THAN (40) ENGINE =
MyISAM
,
PARTITION pa5 VALUES LESS THAN (50) ENGINE =
MyISAM
,
PARTITION pa6 VALUES LESS THAN (60) ENGINE =
MyISAM
,
PARTITION pa7 VALUES LESS THAN (70) ENGINE =
MyISAM
,
PARTITION pa8 VALUES LESS THAN (80) ENGINE =
MyISAM
,
PARTITION pa9 VALUES LESS THAN (90) ENGINE =
MyISAM
,
PARTITION pa10 VALUES LESS THAN (100) ENGINE =
MyISAM
,
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE =
MyISAM
) */
(PARTITION pa1 VALUES LESS THAN (10) ENGINE =
InnoDB
,
PARTITION pa2 VALUES LESS THAN (20) ENGINE =
InnoDB
,
PARTITION pa3 VALUES LESS THAN (30) ENGINE =
InnoDB
,
PARTITION pa4 VALUES LESS THAN (40) ENGINE =
InnoDB
,
PARTITION pa5 VALUES LESS THAN (50) ENGINE =
InnoDB
,
PARTITION pa6 VALUES LESS THAN (60) ENGINE =
InnoDB
,
PARTITION pa7 VALUES LESS THAN (70) ENGINE =
InnoDB
,
PARTITION pa8 VALUES LESS THAN (80) ENGINE =
InnoDB
,
PARTITION pa9 VALUES LESS THAN (90) ENGINE =
InnoDB
,
PARTITION pa10 VALUES LESS THAN (100) ENGINE =
InnoDB
,
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE =
InnoDB
) */
show slave status;
Slave_IO_State #
Master_Host 127.0.0.1
...
...
@@ -181,6 +183,8 @@ SELECT count(*) "Slave bykey" FROM t2;
Slave bykey 500
SELECT count(*) "Slave byrange" FROM t3;
Slave byrange 500
set @@global.binlog_format= @old_global_binlog_format;
set @@session.binlog_format= @old_session_binlog_format;
DROP TABLE t1, t2, t3;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
...
...
mysql-test/suite/parts/t/partition_recover_myisam.test
View file @
6a4f8a8d
...
...
@@ -10,8 +10,10 @@ drop table if exists t1_will_crash;
CREATE
TABLE
t1_will_crash
(
a
INT
,
KEY
(
a
))
ENGINE
=
MyISAM
;
INSERT
INTO
t1_will_crash
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
),
(
6
),
(
7
),
(
8
),
(
9
),
(
10
),
(
11
);
FLUSH
TABLES
;
--
echo
# replacing t1.MYI with a corrupt + unclosed one created by doing:
--
echo
# 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
remove_file
$MYSQLD_DATADIR
/
test
/
t1_will_crash
.
MYI
--
copy_file
std_data
/
corrupt_t1
.
MYI
$MYSQLD_DATADIR
/
test
/
t1_will_crash
.
MYI
SELECT
*
FROM
t1_will_crash
;
...
...
mysql-test/suite/parts/t/partition_repair_myisam.test
View file @
6a4f8a8d
...
...
@@ -8,14 +8,16 @@ drop table if exists t1_will_crash;
--
echo
# REPAIR USE_FRM is not implemented for partitioned tables.
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
echo
# test of non partitioned myisam for reference
CREATE
TABLE
t1_will_crash
(
a
INT
,
KEY
(
a
))
ENGINE
=
MyISAM
;
INSERT
INTO
t1_will_crash
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
),
(
6
),
(
7
),
(
8
),
(
9
),
(
10
),
(
11
);
FLUSH
TABLES
;
--
echo
# replacing t1.MYI with a corrupt + unclosed one created by doing:
--
echo
# 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
.
MYI
--
copy_file
std_data
/
corrupt_t1
.
MYI
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
.
MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
.
MYI
--
copy_file
std_data
/
corrupt_t1
.
MYI
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
.
MYI
CHECK
TABLE
t1_will_crash
;
REPAIR
TABLE
t1_will_crash
;
SELECT
*
FROM
t1_will_crash
;
...
...
@@ -32,16 +34,16 @@ FLUSH TABLES;
--
echo
# replacing t1#P#p1.MYI with a corrupt + unclosed one created by doing:
--
echo
# 'create table t1 (a int key(a)) partition by hash (a) partitions 3'
--
echo
# head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p1.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p1.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p1.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p1.MYI
CHECK
TABLE
t1_will_crash
;
REPAIR
TABLE
t1_will_crash
;
SELECT
*
FROM
t1_will_crash
;
FLUSH
TABLES
;
--
echo
# test with ALTER TABLE ... CHECK/REPAIR PARTITION
--
echo
# replacing t1_will_crash#P#p1.MYI with a corrupt + unclosed one
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p1.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p1.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p1.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p1.MYI
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p0
,
p2
;
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p0
,
p1
;
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p1
,
p2
;
...
...
@@ -63,16 +65,16 @@ SELECT * FROM t1_will_crash;
FLUSH
TABLES
;
--
echo
# test with CHECK/REPAIR TABLE
--
echo
# replacing t1_will_crash#P#p1#SP#p1sp0.MYI with a corrupt + unclosed one
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p1#SP#p1sp0.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p1#SP#p1sp0.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p1#SP#p1sp0.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p1#SP#p1sp0.MYI
CHECK
TABLE
t1_will_crash
;
REPAIR
TABLE
t1_will_crash
;
SELECT
*
FROM
t1_will_crash
;
FLUSH
TABLES
;
--
echo
# test with ALTER TABLE ... CHECK/REPAIR PARTITION
--
echo
# replacing t1_will_crash#P#p1#SP#p1sp0.MYI with a corrupt + unclosed one
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p1#SP#p1sp0.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p1#SP#p1sp0.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p1#SP#p1sp0.MYI
--
copy_file
std_data
/
corrupt_t1
#P#p1.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p1#SP#p1sp0.MYI
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p0
;
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
all
;
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p1
;
...
...
@@ -94,7 +96,7 @@ PARTITIONS 7;
# creating a longer string for for filling the records
let
$i
=
3
;
let
$lt
=
longtext
;
while
(
$i
>
0
)
while
(
$i
)
{
let
$lt
=
$lt$lt
;
dec
$i
;
...
...
@@ -152,22 +154,22 @@ SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partiti
FLUSH
TABLES
;
# testing p0, p1, p3, p6(1)
--
echo
# truncating p0 to simulate an empty datafile (not recovered!)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p0.MYD
--
write_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p0.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p0.MYD
--
write_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p0.MYD
EOF
--
echo
# replacing p1 with only the first 1024 bytes (not recovered!)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p1.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p1_first_1024.MYD $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p1.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p1.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p1_first_1024.MYD $MYSQL
D_DATADIR
/test/t1_will_crash#P#p1.MYD
--
echo
# replacing p3 with a crashed one at the last row in first insert
--
echo
# (crashed right after *share->write_record())
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p3.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p3.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p3.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p3.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p3.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p3.MYI
--
echo
# replacing p6 with a crashed MYD file (1) (splitted dynamic record)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6.MYD $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p6.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6.MYD $MYSQL
D_DATADIR
/test/t1_will_crash#P#p6.MYD
ANALYZE
TABLE
t1_will_crash
;
OPTIMIZE
TABLE
t1_will_crash
;
CHECK
TABLE
t1_will_crash
;
...
...
@@ -180,10 +182,10 @@ FLUSH TABLES;
# testing p2, p4, p6(2, 3)
--
echo
#
--
echo
# replacing p2 with crashed files (after _mi_mark_changed)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p2.MYI
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p2.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p2.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p2.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p2.MYD $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p2.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p2.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p2.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p2.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p2.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p2.MYD $MYSQL
D_DATADIR
/test/t1_will_crash#P#p2.MYD
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p2
;
--
echo
# crash was when index only marked as opened, no real corruption
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p2
;
...
...
@@ -191,8 +193,8 @@ FLUSH TABLES;
--
echo
#
--
echo
# replacing p4 with updated but not closed index file
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p4.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p4.MYI $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p4.MYI
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p4.MYI
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p4.MYI $MYSQL
D_DATADIR
/test/t1_will_crash#P#p4.MYI
#SHOW TABLE STATUS like 't1_will_crash';
#ALTER TABLE t1_will_crash ANALYZE PARTITION p4;
#SHOW TABLE STATUS like 't1_will_crash';
...
...
@@ -206,8 +208,8 @@ FLUSH TABLES;
--
echo
#
--
echo
# replacing p6 with a crashed MYD file (2) (splitted dynamic record)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6_2.MYD $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p6.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6_2.MYD $MYSQL
D_DATADIR
/test/t1_will_crash#P#p6.MYD
#ALTER TABLE t1_will_crash OPTIMIZE PARTITION p6;
ALTER
TABLE
t1_will_crash
CHECK
PARTITION
p6
;
ALTER
TABLE
t1_will_crash
REPAIR
PARTITION
p6
;
...
...
@@ -218,8 +220,8 @@ FLUSH TABLES;
--
echo
#
--
echo
# replacing p6 with a crashed MYD file (3) (splitted dynamic record)
--
remove_file
$MYSQL
TEST_VARDIR
/
master
-
data
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6_3.MYD $MYSQL
TEST_VARDIR/master-data
/test/t1_will_crash#P#p6.MYD
--
remove_file
$MYSQL
D_DATADIR
/
test
/
t1_will_crash
#P#p6.MYD
--
copy_file
std_data
/
parts
/
t1_will_crash
#P#p6_3.MYD $MYSQL
D_DATADIR
/test/t1_will_crash#P#p6.MYD
--
echo
# Different results from the corrupt table, which can lead to dropping
--
echo
# of the not completely written rows when using REBUILD on a corrupt
--
echo
# table, depending if one reads via index or direct on datafile.
...
...
mysql-test/suite/parts/t/rpl_partition.test
View file @
6a4f8a8d
...
...
@@ -6,6 +6,8 @@
let
$engine_type
=
'innodb'
;
set
@
old_global_binlog_format
=
@@
global
.
binlog_format
;
set
@
old_session_binlog_format
=
@@
session
.
binlog_format
;
SET
GLOBAL
binlog_format
=
'ROW'
;
SET
SESSION
binlog_format
=
'ROW'
;
select
@@
global
.
binlog_format
,
@@
session
.
binlog_format
;
...
...
@@ -150,6 +152,8 @@ SELECT count(*) "Slave bykey" FROM t2;
SELECT
count
(
*
)
"Slave byrange"
FROM
t3
;
connection
master
;
set
@@
global
.
binlog_format
=
@
old_global_binlog_format
;
set
@@
session
.
binlog_format
=
@
old_session_binlog_format
;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
PROCEDURE
IF
EXISTS
p1
;
DROP
PROCEDURE
IF
EXISTS
p2
;
...
...
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