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
36
--error ER_PARSE_ERROR
56
37
create table CURTIME(a int);
38
--error ER_PARSE_ERROR
57
39
create table CURTIME (a int);
60
41
--error ER_PARSE_ERROR
61
42
create table DATE_ADD(a int);
43
--error ER_PARSE_ERROR
62
44
create table DATE_ADD (a int);
65
46
--error ER_PARSE_ERROR
66
47
create table DATE_SUB(a int);
48
--error ER_PARSE_ERROR
67
49
create table DATE_SUB (a int);
70
51
--error ER_PARSE_ERROR
71
52
create table EXTRACT(a int);
53
--error ER_PARSE_ERROR
72
54
create table EXTRACT (a int);
75
56
--error ER_PARSE_ERROR
76
57
create table GROUP_CONCAT(a int);
58
--error ER_PARSE_ERROR
77
59
create table GROUP_CONCAT (a int);
78
drop table GROUP_CONCAT;
80
61
# Limitation removed in 5.1
81
62
create table GROUP_UNIQUE_USERS(a int);
86
67
--error ER_PARSE_ERROR
87
68
create table MAX(a int);
69
--error ER_PARSE_ERROR
88
70
create table MAX (a int);
91
72
--error ER_PARSE_ERROR
92
73
create table MID(a int);
74
--error ER_PARSE_ERROR
93
75
create table MID (a int);
96
77
--error ER_PARSE_ERROR
97
78
create table MIN(a int);
79
--error ER_PARSE_ERROR
98
80
create table MIN (a int);
101
82
--error ER_PARSE_ERROR
102
83
create table NOW(a int);
84
--error ER_PARSE_ERROR
103
85
create table NOW (a int);
106
87
--error ER_PARSE_ERROR
107
88
create table POSITION(a int);
89
--error ER_PARSE_ERROR
108
90
create table POSITION (a int);
111
92
create table SESSION_USER(a int);
112
93
drop table SESSION_USER;
116
97
--error ER_PARSE_ERROR
117
98
create table STD(a int);
99
--error ER_PARSE_ERROR
118
100
create table STD (a int);
121
102
--error ER_PARSE_ERROR
122
103
create table STDDEV(a int);
104
--error ER_PARSE_ERROR
123
105
create table STDDEV (a int);
126
107
--error ER_PARSE_ERROR
127
108
create table STDDEV_POP(a int);
109
--error ER_PARSE_ERROR
128
110
create table STDDEV_POP (a int);
129
drop table STDDEV_POP;
131
112
--error ER_PARSE_ERROR
132
113
create table STDDEV_SAMP(a int);
114
--error ER_PARSE_ERROR
133
115
create table STDDEV_SAMP (a int);
134
drop table STDDEV_SAMP;
136
117
create table SUBDATE(a int);
137
118
drop table SUBDATE;
141
122
--error ER_PARSE_ERROR
142
123
create table SUBSTR(a int);
124
--error ER_PARSE_ERROR
143
125
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
127
--error ER_PARSE_ERROR
152
128
create table SUM(a int);
129
--error ER_PARSE_ERROR
153
130
create table SUM (a int);
156
132
--error ER_PARSE_ERROR
157
133
create table SYSDATE(a int);
134
--error ER_PARSE_ERROR
158
135
create table SYSDATE (a int);
161
137
create table SYSTEM_USER(a int);
162
138
drop table SYSTEM_USER;
177
153
--error ER_PARSE_ERROR
178
154
create table VARIANCE(a int);
155
--error ER_PARSE_ERROR
179
156
create table VARIANCE (a int);
182
158
--error ER_PARSE_ERROR
183
159
create table VAR_POP(a int);
160
--error ER_PARSE_ERROR
184
161
create table VAR_POP (a int);
187
163
--error ER_PARSE_ERROR
188
164
create table VAR_SAMP(a int);
165
--error ER_PARSE_ERROR
189
166
create table VAR_SAMP (a int);
192
set SQL_MODE='IGNORE_SPACE';
194
168
create table ADDDATE(a int);
195
169
drop table ADDDATE;
196
170
create table ADDDATE (a int);
197
171
drop table ADDDATE;
199
--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
173
--error ER_PARSE_ERROR
215
174
create table CAST(a int);
373
332
DROP TABLE IF EXISTS table_25930_b;
374
333
--enable_warnings
376
SET SQL_MODE = 'ANSI_QUOTES';
335
--error ER_PARSE_ERROR
377
336
CREATE TABLE table_25930_a ( "blah" INT );
337
CREATE TABLE table_25930_a ( blah INT );
378
338
CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
380
340
# The lexer used to chop the first <">,
385
345
DROP TABLE table_25930_b;
388
SET @@sql_mode=@save_sql_mode;
390
348
#=============================================================================
391
349
# SYNTACTIC PARSER (bison)
392
350
#=============================================================================
435
393
select concat_ws("foo");
437
395
-- 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
397
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
645
593
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
646
594
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
647
595
SELECT 1 + INTERVAL(1,0,1,2) + 1;
648
SELECT INTERVAL(1^1,0,1,2) + 1;
596
SELECT INTERVAL(1,0,1,2) + 1;
649
597
SELECT INTERVAL(1,0+1,2,3) * 5.5;
650
598
SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
651
599
SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
652
600
SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
653
601
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
603
CREATE TABLE t1 (a INT, b DATETIME);
661
604
INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
662
605
SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;