~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/t/partition_bug18198.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_partition.inc
 
2
--disable_warnings
 
3
drop table if exists t1;
 
4
--enable_warnings
 
5
 
 
6
create table t1 (col1 datetime)
 
7
partition by range(datediff(col1,col1))
 
8
(partition p0 values less than (10), partition p1 values less than (30));
 
9
drop table t1;
 
10
 
 
11
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
12
create table t1 (col1 int)
 
13
partition by range(greatest(col1,10))
 
14
(partition p0 values less than (2), partition p1 values less than (6));
 
15
 
 
16
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
17
create table t1 (col1 int)
 
18
partition by range(isnull(col1))
 
19
(partition p0 values less than (2), partition p1 values less than (6));
 
20
 
 
21
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
22
create table t1 (col1 int)
 
23
partition by range(least(col1,12))
 
24
(partition p0 values less than (2), partition p1 values less than (6));
 
25
 
 
26
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
27
create table t1 (col1 int)
 
28
partition by range(case when col1>0 then 10 else 20 end)
 
29
(partition p0 values less than (2), partition p1 values less than (6));
 
30
 
 
31
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
32
create table t1 (col1 int)
 
33
partition by range(ifnull(col1,5))
 
34
(partition p0 values less than (2), partition p1 values less than (6));
 
35
 
 
36
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
37
create table t1 (col1 int)
 
38
partition by range(nullif(col1,5))
 
39
(partition p0 values less than (2), partition p1 values less than (6));
 
40
 
 
41
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
42
create table t1 (col1 int)
 
43
partition by range(bit_length(col1))
 
44
(partition p0 values less than (2), partition p1 values less than (6));
 
45
 
 
46
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
47
create table t1 (col1 char(5))
 
48
partition by range(bit_length(col1))
 
49
(partition p0 values less than (2), partition p1 values less than (6));
 
50
 
 
51
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
52
create table t1 (col1 int)
 
53
partition by range(char_length(col1))
 
54
(partition p0 values less than (2), partition p1 values less than (6));
 
55
 
 
56
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
57
create table t1 (col1 char(5))
 
58
partition by range(char_length(col1))
 
59
(partition p0 values less than (2), partition p1 values less than (6));
 
60
 
 
61
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
62
create table t1 (col1 char(5))
 
63
partition by range(character_length(col1))
 
64
(partition p0 values less than (2), partition p1 values less than (6));
 
65
 
 
66
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
67
create table t1 (col1 int)
 
68
partition by range(find_in_set(col1,1))
 
69
(partition p0 values less than (2), partition p1 values less than (6));
 
70
 
 
71
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
72
create table t1 (col1 char(5))
 
73
partition by range(find_in_set(col1,'1'))
 
74
(partition p0 values less than (2), partition p1 values less than (6));
 
75
 
 
76
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
77
create table t1 (col1 int)
 
78
partition by range(instr(col1,3))
 
79
(partition p0 values less than (2), partition p1 values less than (6));
 
80
 
 
81
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
82
create table t1 (col1 char(5))
 
83
partition by range(instr(col1,'3'))
 
84
(partition p0 values less than (2), partition p1 values less than (6));
 
85
 
 
86
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
87
create table t1 (col1 char(5))
 
88
partition by range(length(col1))
 
89
(partition p0 values less than (2), partition p1 values less than (6));
 
90
 
 
91
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
92
create table t1 (col1 char(5))
 
93
partition by range(locate(1,col1))
 
94
(partition p0 values less than (2), partition p1 values less than (6));
 
95
 
 
96
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
97
create table t1 (col1 int)
 
98
partition by range(locate(1,col1))
 
99
(partition p0 values less than (2), partition p1 values less than (6));
 
100
 
 
101
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
102
create table t1 (col1 char(5))
 
103
partition by range(octet_length(col1))
 
104
(partition p0 values less than (2), partition p1 values less than (6));
 
105
 
 
106
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
107
create table t1 (col1 char(5))
 
108
partition by range(position(1 in col1))
 
109
(partition p0 values less than (2), partition p1 values less than (6));
 
110
 
 
111
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
112
create table t1 (col1 int)
 
113
partition by range(position(1 in col1))
 
114
(partition p0 values less than (2), partition p1 values less than (6));
 
115
 
 
116
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
117
create table t1 (col1 char(5))
 
118
partition by range(strcmp(col1,2))
 
119
(partition p0 values less than (2), partition p1 values less than (6));
 
120
 
 
121
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
122
create table t1 (col1 int)
 
123
partition by range(strcmp(col1,2))
 
124
(partition p0 values less than (2), partition p1 values less than (6));
 
125
 
 
126
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
127
create table t1 (col1 int)
 
128
partition by range(crc32(col1))
 
129
(partition p0 values less than (2), partition p1 values less than (6));
 
130
 
 
131
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
132
create table t1 (col1 int)
 
133
partition by range(round(col1))
 
134
(partition p0 values less than (2), partition p1 values less than (6));
 
135
 
 
136
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
137
create table t1 (col1 int)
 
138
partition by range(sign(col1))
 
139
(partition p0 values less than (2), partition p1 values less than (6));
 
140
 
 
141
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
142
create table t1 (col1 datetime)
 
143
partition by range(period_add(col1,5))
 
144
(partition p0 values less than (10), partition p1 values less than (30));
 
145
 
 
146
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
147
create table t1 (col1 datetime, col2 datetime)
 
148
partition by range(period_diff(col1,col2))
 
149
(partition p0 values less than (10), partition p1 values less than (30));
 
150
 
 
151
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
152
create table t1 (col1 int, col2 int)
 
153
partition by range(period_diff(col1,col2))
 
154
(partition p0 values less than (10), partition p1 values less than (30));
 
155
 
 
156
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
157
create table t1 (col1 datetime)
 
158
partition by range(timestampdiff(day,5,col1))
 
159
(partition p0 values less than (10), partition p1 values less than (30));
 
160
 
 
161
-- error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
 
162
create table t1 (col1 date)
 
163
partition by range(unix_timestamp(col1))
 
164
(partition p0 values less than (10), partition p1 values less than (30));
 
165
 
 
166
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
167
create table t1 (col1 datetime)
 
168
partition by range(week(col1))
 
169
(partition p0 values less than (10), partition p1 values less than (30));
 
170
 
 
171
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
172
create table t1 (col1 varchar(25))
 
173
partition by range(cast(col1 as signed))
 
174
(partition p0 values less than (10), partition p1 values less than (30));
 
175
 
 
176
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
177
create table t1 (col1 varchar(25))
 
178
partition by range(convert(col1,unsigned))
 
179
(partition p0 values less than (10), partition p1 values less than (30));
 
180
 
 
181
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
182
create table t1 (col1 int)
 
183
partition by range(col1 | 20)
 
184
(partition p0 values less than (10), partition p1 values less than (30));
 
185
 
 
186
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
187
create table t1 (col1 int)
 
188
partition by range(col1 & 20)
 
189
(partition p0 values less than (10), partition p1 values less than (30));
 
190
 
 
191
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
192
create table t1 (col1 int)
 
193
partition by range(col1 ^ 20)
 
194
(partition p0 values less than (10), partition p1 values less than (30));
 
195
 
 
196
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
197
create table t1 (col1 int)
 
198
partition by range(col1 << 20)
 
199
(partition p0 values less than (10), partition p1 values less than (30));
 
200
 
 
201
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
202
create table t1 (col1 int)
 
203
partition by range(col1 >> 20)
 
204
(partition p0 values less than (10), partition p1 values less than (30));
 
205
 
 
206
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
207
create table t1 (col1 int)
 
208
partition by range(~col1)
 
209
(partition p0 values less than (10), partition p1 values less than (30));
 
210
 
 
211
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
212
create table t1 (col1 int)
 
213
partition by range(bit_count(col1))
 
214
(partition p0 values less than (10), partition p1 values less than (30));
 
215
 
 
216
-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
 
217
create table t1 (col1 int)
 
218
partition by range(inet_aton(col1))
 
219
(partition p0 values less than (10), partition p1 values less than (30));