summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_mgm_err.result
blob: a13278d724efd8858db06542d15c89999e1db8f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
drop table if exists t1;
CREATE TABLE t1 (a int, b int)
PARTITION BY RANGE (a)
(PARTITION x0 VALUES LESS THAN (2),
PARTITION x1 VALUES LESS THAN (4),
PARTITION x2 VALUES LESS THAN (6),
PARTITION x3 VALUES LESS THAN (8),
PARTITION x4 VALUES LESS THAN (10),
PARTITION x5 VALUES LESS THAN (12),
PARTITION x6 VALUES LESS THAN (14),
PARTITION x7 VALUES LESS THAN (16),
PARTITION x8 VALUES LESS THAN (18),
PARTITION x9 VALUES LESS THAN (20));
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (2),
PARTITION x11 VALUES LESS THAN (5));
ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x3, x3;
ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x10;
ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x1;
ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3;
ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO
(PARTITION x11 VALUES LESS THAN (22));
ERROR HY000: More partitions to reorganize than there are partitions
ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
(PARTITION x3 VALUES LESS THAN (6));
ERROR HY000: Duplicate partition name x3
ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO
(PARTITION x11 VALUES LESS THAN (2));
ERROR HY000: When reorganizing a set of partitions they must be in consecutive order
ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO
(PARTITION x11 VALUES LESS THAN (4));
ERROR HY000: Error in list of partitions to REORGANIZE
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (5));
ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (4),
PARTITION x11 VALUES LESS THAN (2));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (6),
PARTITION x11 VALUES LESS THAN (4));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY KEY (a)
PARTITIONS 2;
ALTER TABLE t1 ADD PARTITION (PARTITION p1);
ERROR HY000: Duplicate partition name p1
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY KEY (a)
(PARTITION x0, PARTITION x1, PARTITION x2, PARTITION x3, PARTITION x3);
ERROR HY000: Duplicate partition name x3
CREATE TABLE t1 (a int)
PARTITION BY RANGE (a)
SUBPARTITION BY KEY (a)
SUBPARTITIONS 2
(PARTITION x0 VALUES LESS THAN (4),
PARTITION x1 VALUES LESS THAN (8));
ALTER TABLE t1 ADD PARTITION (PARTITION x2 VALUES LESS THAN (5)
(SUBPARTITION sp0, SUBPARTITION sp1));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
ALTER TABLE t1 ADD PARTITION (PARTITION x2 VALUES LESS THAN (12)
(SUBPARTITION sp0, SUBPARTITION sp1, SUBPARTITION sp2));
ERROR HY000: Trying to Add partition(s) with wrong number of subpartitions
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY LIST (a)
(PARTITION x0 VALUES IN (1,2,3),
PARTITION x1 VALUES IN (4,5,6));
ALTER TABLE t1 ADD PARTITION (PARTITION x2 VALUES IN (3,4));
ERROR HY000: Multiple definition of same constant in list partitioning
DROP TABLE t1;
CREATE TABLE t1 (a int);
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 DROP PARTITION x1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 ANALYZE PARTITION p1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 CHECK PARTITION p1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 OPTIMIZE PARTITION p1;
ERROR HY000: Partition management on a not partitioned table is not possible
ALTER TABLE t1 REPAIR PARTITION p1;
ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY KEY (a)
(PARTITION x0, PARTITION x1);
ALTER TABLE t1 ADD PARTITION PARTITIONS 0;
ERROR HY000: At least one partition must be added
ALTER TABLE t1 ADD PARTITION PARTITIONS 1024;
ERROR HY000: Too many partitions (including subpartitions) were defined
ALTER TABLE t1 DROP PARTITION x0;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
ALTER TABLE t1 COALESCE PARTITION 1;
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: Cannot remove all partitions, use DROP TABLE instead
DROP TABLE t1;
CREATE TABLE t1 (a int)
PARTITION BY RANGE (a)
(PARTITION x0 VALUES LESS THAN (4),
PARTITION x1 VALUES LESS THAN (8));
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
ERROR HY000: For RANGE partitions each partition must be defined
ALTER TABLE t1 DROP PARTITION x2;
ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: COALESCE PARTITION can only be used on HASH/KEY partitions
ALTER TABLE t1 DROP PARTITION x1;
ALTER TABLE t1 DROP PARTITION x0;
ERROR HY000: Cannot remove all partitions, use DROP TABLE instead
DROP TABLE t1;
CREATE TABLE t1 ( id INT NOT NULL,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
hired DATE NOT NULL )
PARTITION BY RANGE(YEAR(hired)) (
PARTITION p1 VALUES LESS THAN (1991),
PARTITION p2 VALUES LESS THAN (1996),
PARTITION p3 VALUES LESS THAN (2001),
PARTITION p4 VALUES LESS THAN (2005));
ALTER TABLE t1 ADD PARTITION (
PARTITION p5 VALUES LESS THAN (2010),
PARTITION p6 VALUES LESS THAN MAXVALUE);
DROP TABLE t1;
CREATE TABLE t1 (a INT);
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
PARTITIONS 2 */
DROP TABLE t1;
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
DROP TABLE t1;
CREATE TABLE t1 (s1 int, s2 int)
PARTITION BY LIST (s1) 
SUBPARTITION BY KEY (s2) (
PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), 
PARTITION p2 VALUES IN (2) (SUBPARTITION p1b)
);
ERROR HY000: Duplicate partition name p1b