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
a3d5c3bf
Commit
a3d5c3bf
authored
Jun 20, 2006
by
mikael@dator5.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#16000: .par file left behind plus unnecessary messages to error.log
New test cases
parent
3505cdb0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
2 deletions
+67
-2
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+39
-0
mysql-test/r/partition_mgm.result
mysql-test/r/partition_mgm.result
+10
-0
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+14
-0
mysql-test/t/partition_mgm.test
mysql-test/t/partition_mgm.test
+4
-2
No files found.
mysql-test/r/partition_error.result
View file @
a3d5c3bf
...
@@ -89,6 +89,9 @@ partitions 3
...
@@ -89,6 +89,9 @@ partitions 3
partition x2 tablespace ts2,
partition x2 tablespace ts2,
partition x3 tablespace ts3);
partition x3 tablespace ts3);
ERROR HY000: Field in list of fields for partition function not found in table
ERROR HY000: Field in list of fields for partition function not found in table
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -163,6 +166,9 @@ partitions 2
...
@@ -163,6 +166,9 @@ partitions 2
(partition x1 values less than (4),
(partition x1 values less than (4),
partition x2 values less than (5));
partition x2 values less than (5));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -173,6 +179,9 @@ partitions 2
...
@@ -173,6 +179,9 @@ partitions 2
(partition x1 values in (4),
(partition x1 values in (4),
partition x2 values in (5));
partition x2 values in (5));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -183,6 +192,9 @@ partitions 2
...
@@ -183,6 +192,9 @@ partitions 2
(partition x1 values in (4,6),
(partition x1 values in (4,6),
partition x2 values in (5,7));
partition x2 values in (5,7));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -191,6 +203,9 @@ primary key (a,b))
...
@@ -191,6 +203,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by key (b);
subpartition by key (b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -199,6 +214,9 @@ primary key (a,b))
...
@@ -199,6 +214,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by key (a, b);
subpartition by key (a, b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -207,6 +225,9 @@ primary key (a,b))
...
@@ -207,6 +225,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by hash (a+b);
subpartition by hash (a+b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -215,6 +236,9 @@ primary key (a,b))
...
@@ -215,6 +236,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by key (b);
subpartition by key (b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -223,6 +247,9 @@ primary key (a,b))
...
@@ -223,6 +247,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by key (a, b);
subpartition by key (a, b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -231,6 +258,9 @@ primary key (a,b))
...
@@ -231,6 +258,9 @@ primary key (a,b))
partition by key (a)
partition by key (a)
subpartition by hash (a+b);
subpartition by hash (a+b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -249,6 +279,9 @@ subpartition by hash (sin(a+b))
...
@@ -249,6 +279,9 @@ subpartition by hash (sin(a+b))
(partition x1 (subpartition x11, subpartition x12),
(partition x1 (subpartition x11, subpartition x12),
partition x2 (subpartition x21, subpartition x22));
partition x2 (subpartition x21, subpartition x22));
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -271,6 +304,9 @@ subpartition by key (a,d)
...
@@ -271,6 +304,9 @@ subpartition by key (a,d)
(partition x1 values less than (1) (subpartition x11, subpartition x12),
(partition x1 values less than (1) (subpartition x11, subpartition x12),
partition x2 values less than (2) (subpartition x21, subpartition x22));
partition x2 values less than (2) (subpartition x21, subpartition x22));
ERROR HY000: Field in list of fields for partition function not found in table
ERROR HY000: Field in list of fields for partition function not found in table
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
@@ -296,6 +332,9 @@ c int not null,
...
@@ -296,6 +332,9 @@ c int not null,
primary key(a,b))
primary key(a,b))
partition by range (a);
partition by range (a);
ERROR HY000: For RANGE partitions each partition must be defined
ERROR HY000: For RANGE partitions each partition must be defined
select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par');
load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par')
NULL
CREATE TABLE t1 (
CREATE TABLE t1 (
a int not null,
a int not null,
b int not null,
b int not null,
...
...
mysql-test/r/partition_mgm.result
View file @
a3d5c3bf
...
@@ -7,6 +7,12 @@ t1 CREATE TABLE `t1` (
...
@@ -7,6 +7,12 @@ t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2
hello/master-data/test/t1#P#p0.MYD
hello/master-data/test/t1#P#p0.MYI
hello/master-data/test/t1#P#p1.MYD
hello/master-data/test/t1#P#p1.MYI
hello/master-data/test/t1.frm
hello/master-data/test/t1.par
ALTER TABLE t1 COALESCE PARTITION 1;
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t1;
Table Create Table
Table Create Table
...
@@ -14,3 +20,7 @@ t1 CREATE TABLE `t1` (
...
@@ -14,3 +20,7 @@ t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1
hello/master-data/test/t1#P#p0.MYD
hello/master-data/test/t1#P#p0.MYI
hello/master-data/test/t1.frm
hello/master-data/test/t1.par
mysql-test/t/partition_error.test
View file @
a3d5c3bf
...
@@ -107,6 +107,8 @@ partitions 3
...
@@ -107,6 +107,8 @@ partitions 3
(
partition
x1
tablespace
ts1
,
(
partition
x1
tablespace
ts1
,
partition
x2
tablespace
ts2
,
partition
x2
tablespace
ts2
,
partition
x3
tablespace
ts3
);
partition
x3
tablespace
ts3
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Partition by hash, invalid field in function
# Partition by hash, invalid field in function
#
#
...
@@ -202,6 +204,7 @@ partition by hash (a)
...
@@ -202,6 +204,7 @@ partition by hash (a)
partitions
2
partitions
2
(
partition
x1
values
less
than
(
4
),
(
partition
x1
values
less
than
(
4
),
partition
x2
values
less
than
(
5
));
partition
x2
values
less
than
(
5
));
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Partition by hash, values in error
# Partition by hash, values in error
...
@@ -216,6 +219,7 @@ partition by hash (a)
...
@@ -216,6 +219,7 @@ partition by hash (a)
partitions
2
partitions
2
(
partition
x1
values
in
(
4
),
(
partition
x1
values
in
(
4
),
partition
x2
values
in
(
5
));
partition
x2
values
in
(
5
));
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Partition by hash, values in error
# Partition by hash, values in error
...
@@ -230,6 +234,7 @@ partition by hash (a)
...
@@ -230,6 +234,7 @@ partition by hash (a)
partitions
2
partitions
2
(
partition
x1
values
in
(
4
,
6
),
(
partition
x1
values
in
(
4
,
6
),
partition
x2
values
in
(
5
,
7
));
partition
x2
values
in
(
5
,
7
));
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by key, no partitions defined, single field
# Subpartition by key, no partitions defined, single field
...
@@ -242,6 +247,7 @@ c int not null,
...
@@ -242,6 +247,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
key
(
b
);
subpartition
by
key
(
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by key, no partitions defined, list of fields
# Subpartition by key, no partitions defined, list of fields
...
@@ -254,6 +260,7 @@ c int not null,
...
@@ -254,6 +260,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
key
(
a
,
b
);
subpartition
by
key
(
a
,
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by hash, no partitions defined
# Subpartition by hash, no partitions defined
...
@@ -266,6 +273,7 @@ c int not null,
...
@@ -266,6 +273,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
hash
(
a
+
b
);
subpartition
by
hash
(
a
+
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by key, no partitions defined, single field
# Subpartition by key, no partitions defined, single field
...
@@ -278,6 +286,7 @@ c int not null,
...
@@ -278,6 +286,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
key
(
b
);
subpartition
by
key
(
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by key, no partitions defined, list of fields
# Subpartition by key, no partitions defined, list of fields
...
@@ -290,6 +299,7 @@ c int not null,
...
@@ -290,6 +299,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
key
(
a
,
b
);
subpartition
by
key
(
a
,
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by hash, no partitions defined
# Subpartition by hash, no partitions defined
...
@@ -302,6 +312,7 @@ c int not null,
...
@@ -302,6 +312,7 @@ c int not null,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
key
(
a
)
partition
by
key
(
a
)
subpartition
by
hash
(
a
+
b
);
subpartition
by
hash
(
a
+
b
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by hash, no partitions defined, wrong subpartition function
# Subpartition by hash, no partitions defined, wrong subpartition function
...
@@ -328,6 +339,7 @@ partition by key (a)
...
@@ -328,6 +339,7 @@ partition by key (a)
subpartition
by
hash
(
sin
(
a
+
b
))
subpartition
by
hash
(
sin
(
a
+
b
))
(
partition
x1
(
subpartition
x11
,
subpartition
x12
),
(
partition
x1
(
subpartition
x11
,
subpartition
x12
),
partition
x2
(
subpartition
x21
,
subpartition
x22
));
partition
x2
(
subpartition
x21
,
subpartition
x22
));
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by hash, no partitions defined, wrong subpartition function
# Subpartition by hash, no partitions defined, wrong subpartition function
...
@@ -356,6 +368,7 @@ partition by range (a)
...
@@ -356,6 +368,7 @@ partition by range (a)
subpartition
by
key
(
a
,
d
)
subpartition
by
key
(
a
,
d
)
(
partition
x1
values
less
than
(
1
)
(
subpartition
x11
,
subpartition
x12
),
(
partition
x1
values
less
than
(
1
)
(
subpartition
x11
,
subpartition
x12
),
partition
x2
values
less
than
(
2
)
(
subpartition
x21
,
subpartition
x22
));
partition
x2
values
less
than
(
2
)
(
subpartition
x21
,
subpartition
x22
));
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Subpartition by hash, no partitions defined, wrong subpartition function
# Subpartition by hash, no partitions defined, wrong subpartition function
...
@@ -393,6 +406,7 @@ b int not null,
...
@@ -393,6 +406,7 @@ b int not null,
c
int
not
null
,
c
int
not
null
,
primary
key
(
a
,
b
))
primary
key
(
a
,
b
))
partition
by
range
(
a
);
partition
by
range
(
a
);
select
load_file
(
'$MYSQLTEST_VARDIR/master-data/test/t1.par'
);
#
#
# Partition by range, invalid field in function
# Partition by range, invalid field in function
...
...
mysql-test/t/partition_mgm.test
View file @
a3d5c3bf
...
@@ -5,10 +5,12 @@ CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
...
@@ -5,10 +5,12 @@ CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
PARTITION
BY
HASH
(
CAST
(
YEAR
(
f_date
)
AS
SIGNED
INTEGER
))
PARTITIONS
2
;
PARTITION
BY
HASH
(
CAST
(
YEAR
(
f_date
)
AS
SIGNED
INTEGER
))
PARTITIONS
2
;
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t1
;
#--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
--
replace_result
$MYSQLTEST_VARDIR
"hello"
--
exec
ls
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
*
ALTER
TABLE
t1
COALESCE
PARTITION
1
;
ALTER
TABLE
t1
COALESCE
PARTITION
1
;
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t1
;
#--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
--
replace_result
$MYSQLTEST_VARDIR
"hello"
--
exec
ls
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
*
...
...
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