15
13
# - an error is the expected result with the current implementation,
16
14
# and is a limitation.
20
16
create table ADDDATE(a int);
21
17
drop table ADDDATE;
22
18
create table ADDDATE (a int);
23
19
drop table ADDDATE;
25
21
--error ER_PARSE_ERROR
26
create table BIT_AND(a int);
27
create table BIT_AND (a int);
30
--error ER_PARSE_ERROR
31
create table BIT_OR(a int);
32
create table BIT_OR (a int);
35
--error ER_PARSE_ERROR
36
create table BIT_XOR(a int);
37
create table BIT_XOR (a int);
40
--error ER_PARSE_ERROR
41
22
create table CAST(a int);
23
--error ER_PARSE_ERROR
42
24
create table CAST (a int);
45
26
--error ER_PARSE_ERROR
46
27
create table COUNT(a int);
28
--error ER_PARSE_ERROR
47
29
create table COUNT (a int);
50
31
--error ER_PARSE_ERROR
51
32
create table CURDATE(a int);
33
--error ER_PARSE_ERROR
52
34
create table CURDATE (a int);
55
--error ER_PARSE_ERROR
56
create table CURTIME(a int);
57
create table CURTIME (a int);
60
36
--error ER_PARSE_ERROR
61
37
create table DATE_ADD(a int);
38
--error ER_PARSE_ERROR
62
39
create table DATE_ADD (a int);
65
41
--error ER_PARSE_ERROR
66
42
create table DATE_SUB(a int);
43
--error ER_PARSE_ERROR
67
44
create table DATE_SUB (a int);
70
46
--error ER_PARSE_ERROR
71
47
create table EXTRACT(a int);
48
--error ER_PARSE_ERROR
72
49
create table EXTRACT (a int);
75
51
--error ER_PARSE_ERROR
76
52
create table GROUP_CONCAT(a int);
53
--error ER_PARSE_ERROR
77
54
create table GROUP_CONCAT (a int);
78
drop table GROUP_CONCAT;
80
56
# Limitation removed in 5.1
81
57
create table GROUP_UNIQUE_USERS(a int);
86
62
--error ER_PARSE_ERROR
87
63
create table MAX(a int);
64
--error ER_PARSE_ERROR
88
65
create table MAX (a int);
91
67
--error ER_PARSE_ERROR
92
68
create table MID(a int);
69
--error ER_PARSE_ERROR
93
70
create table MID (a int);
96
72
--error ER_PARSE_ERROR
97
73
create table MIN(a int);
74
--error ER_PARSE_ERROR
98
75
create table MIN (a int);
101
77
--error ER_PARSE_ERROR
102
78
create table NOW(a int);
79
--error ER_PARSE_ERROR
103
80
create table NOW (a int);
106
82
--error ER_PARSE_ERROR
107
83
create table POSITION(a int);
84
--error ER_PARSE_ERROR
108
85
create table POSITION (a int);
111
87
create table SESSION_USER(a int);
112
88
drop table SESSION_USER;
116
92
--error ER_PARSE_ERROR
117
93
create table STD(a int);
94
--error ER_PARSE_ERROR
118
95
create table STD (a int);
121
97
--error ER_PARSE_ERROR
122
98
create table STDDEV(a int);
99
--error ER_PARSE_ERROR
123
100
create table STDDEV (a int);
126
102
--error ER_PARSE_ERROR
127
103
create table STDDEV_POP(a int);
104
--error ER_PARSE_ERROR
128
105
create table STDDEV_POP (a int);
129
drop table STDDEV_POP;
131
107
--error ER_PARSE_ERROR
132
108
create table STDDEV_SAMP(a int);
109
--error ER_PARSE_ERROR
133
110
create table STDDEV_SAMP (a int);
134
drop table STDDEV_SAMP;
136
112
create table SUBDATE(a int);
137
113
drop table SUBDATE;
141
117
--error ER_PARSE_ERROR
142
118
create table SUBSTR(a int);
119
--error ER_PARSE_ERROR
143
120
create table SUBSTR (a int);
146
--error ER_PARSE_ERROR
147
create table SUBSTRING(a int);
148
create table SUBSTRING (a int);
149
drop table SUBSTRING;
151
122
--error ER_PARSE_ERROR
152
123
create table SUM(a int);
124
--error ER_PARSE_ERROR
153
125
create table SUM (a int);
156
127
--error ER_PARSE_ERROR
157
128
create table SYSDATE(a int);
129
--error ER_PARSE_ERROR
158
130
create table SYSDATE (a int);
161
132
create table SYSTEM_USER(a int);
162
133
drop table SYSTEM_USER;
177
148
--error ER_PARSE_ERROR
178
149
create table VARIANCE(a int);
150
--error ER_PARSE_ERROR
179
151
create table VARIANCE (a int);
182
153
--error ER_PARSE_ERROR
183
154
create table VAR_POP(a int);
155
--error ER_PARSE_ERROR
184
156
create table VAR_POP (a int);
187
158
--error ER_PARSE_ERROR
188
159
create table VAR_SAMP(a int);
160
--error ER_PARSE_ERROR
189
161
create table VAR_SAMP (a int);
192
set SQL_MODE='IGNORE_SPACE';
194
163
create table ADDDATE(a int);
195
164
drop table ADDDATE;
197
166
drop table ADDDATE;
199
168
--error ER_PARSE_ERROR
200
create table BIT_AND(a int);
201
--error ER_PARSE_ERROR
202
create table BIT_AND (a int);
204
--error ER_PARSE_ERROR
205
create table BIT_OR(a int);
206
--error ER_PARSE_ERROR
207
create table BIT_OR (a int);
209
--error ER_PARSE_ERROR
210
create table BIT_XOR(a int);
211
--error ER_PARSE_ERROR
212
create table BIT_XOR (a int);
214
--error ER_PARSE_ERROR
215
169
create table CAST(a int);
216
170
--error ER_PARSE_ERROR
217
171
create table CAST (a int);
225
179
create table CURDATE(a int);
226
180
--error ER_PARSE_ERROR
227
181
create table CURDATE (a int);
229
--error ER_PARSE_ERROR
230
create table CURTIME(a int);
231
--error ER_PARSE_ERROR
232
create table CURTIME (a int);
234
183
--error ER_PARSE_ERROR
235
184
create table DATE_ADD(a int);
373
322
DROP TABLE IF EXISTS table_25930_b;
374
323
--enable_warnings
376
SET SQL_MODE = 'ANSI_QUOTES';
325
--error ER_PARSE_ERROR
377
326
CREATE TABLE table_25930_a ( "blah" INT );
327
CREATE TABLE table_25930_a ( blah INT );
378
328
CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
380
330
# The lexer used to chop the first <">,
385
335
DROP TABLE table_25930_b;
388
SET @@sql_mode=@save_sql_mode;
390
338
#=============================================================================
391
339
# SYNTACTIC PARSER (bison)
392
340
#=============================================================================
412
360
select makedate(1, 2, 3);
414
362
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
417
select maketime(1, 2);
418
select maketime(1, 2, 3, 4);
421
364
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
422
365
select atan2(1, 2, 3);
435
374
select concat_ws("foo");
437
376
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
439
select encrypt(1, 2, 3);
441
select des_encrypt("p1", "p2", "not expected");
442
select des_decrypt("p1", "p2", "not expected");
445
378
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
502
431
select make_set(1);
504
433
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
505
select master_pos_wait();
506
select master_pos_wait(1);
507
select master_pos_wait(1, 2, 3, 4);
509
434
select rand(1, 2, 3);
511
436
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
512
437
select round(1, 2, 3);
515
select yearweek(1, 2, 3);
518
440
# Bug#24736: UDF functions parsed as Stored Functions
641
558
DROP TABLE IF EXISTS t1;
642
559
--enable_warnings
644
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
645
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
646
561
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
647
562
SELECT 1 + INTERVAL(1,0,1,2) + 1;
648
SELECT INTERVAL(1^1,0,1,2) + 1;
563
SELECT INTERVAL(1,0,1,2) + 1;
649
564
SELECT INTERVAL(1,0+1,2,3) * 5.5;
650
565
SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
651
566
SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
652
567
SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
653
568
SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
656
SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
657
SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
660
570
CREATE TABLE t1 (a INT, b DATETIME);
661
571
INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
662
572
SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;