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

« back to all changes in this revision

Viewing changes to mysql-test/r/parser.result

  • 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
SET @save_sql_mode=@@sql_mode;
 
2
set SQL_MODE='';
 
3
create table ADDDATE(a int);
 
4
drop table ADDDATE;
 
5
create table ADDDATE (a int);
 
6
drop table ADDDATE;
 
7
create table BIT_AND(a int);
 
8
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
 
9
create table BIT_AND (a int);
 
10
drop table BIT_AND;
 
11
create table BIT_OR(a int);
 
12
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
 
13
create table BIT_OR (a int);
 
14
drop table BIT_OR;
 
15
create table BIT_XOR(a int);
 
16
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
 
17
create table BIT_XOR (a int);
 
18
drop table BIT_XOR;
 
19
create table CAST(a int);
 
20
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
 
21
create table CAST (a int);
 
22
drop table CAST;
 
23
create table COUNT(a int);
 
24
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
 
25
create table COUNT (a int);
 
26
drop table COUNT;
 
27
create table CURDATE(a int);
 
28
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
 
29
create table CURDATE (a int);
 
30
drop table CURDATE;
 
31
create table CURTIME(a int);
 
32
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
 
33
create table CURTIME (a int);
 
34
drop table CURTIME;
 
35
create table DATE_ADD(a int);
 
36
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
 
37
create table DATE_ADD (a int);
 
38
drop table DATE_ADD;
 
39
create table DATE_SUB(a int);
 
40
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
 
41
create table DATE_SUB (a int);
 
42
drop table DATE_SUB;
 
43
create table EXTRACT(a int);
 
44
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
 
45
create table EXTRACT (a int);
 
46
drop table EXTRACT;
 
47
create table GROUP_CONCAT(a int);
 
48
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
 
49
create table GROUP_CONCAT (a int);
 
50
drop table GROUP_CONCAT;
 
51
create table GROUP_UNIQUE_USERS(a int);
 
52
drop table GROUP_UNIQUE_USERS;
 
53
create table GROUP_UNIQUE_USERS (a int);
 
54
drop table GROUP_UNIQUE_USERS;
 
55
create table MAX(a int);
 
56
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
 
57
create table MAX (a int);
 
58
drop table MAX;
 
59
create table MID(a int);
 
60
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
 
61
create table MID (a int);
 
62
drop table MID;
 
63
create table MIN(a int);
 
64
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
 
65
create table MIN (a int);
 
66
drop table MIN;
 
67
create table NOW(a int);
 
68
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
 
69
create table NOW (a int);
 
70
drop table NOW;
 
71
create table POSITION(a int);
 
72
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
 
73
create table POSITION (a int);
 
74
drop table POSITION;
 
75
create table SESSION_USER(a int);
 
76
drop table SESSION_USER;
 
77
create table SESSION_USER (a int);
 
78
drop table SESSION_USER;
 
79
create table STD(a int);
 
80
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
 
81
create table STD (a int);
 
82
drop table STD;
 
83
create table STDDEV(a int);
 
84
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
 
85
create table STDDEV (a int);
 
86
drop table STDDEV;
 
87
create table STDDEV_POP(a int);
 
88
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
 
89
create table STDDEV_POP (a int);
 
90
drop table STDDEV_POP;
 
91
create table STDDEV_SAMP(a int);
 
92
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
 
93
create table STDDEV_SAMP (a int);
 
94
drop table STDDEV_SAMP;
 
95
create table SUBDATE(a int);
 
96
drop table SUBDATE;
 
97
create table SUBDATE (a int);
 
98
drop table SUBDATE;
 
99
create table SUBSTR(a int);
 
100
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
 
101
create table SUBSTR (a int);
 
102
drop table SUBSTR;
 
103
create table SUBSTRING(a int);
 
104
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
 
105
create table SUBSTRING (a int);
 
106
drop table SUBSTRING;
 
107
create table SUM(a int);
 
108
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
 
109
create table SUM (a int);
 
110
drop table SUM;
 
111
create table SYSDATE(a int);
 
112
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
 
113
create table SYSDATE (a int);
 
114
drop table SYSDATE;
 
115
create table SYSTEM_USER(a int);
 
116
drop table SYSTEM_USER;
 
117
create table SYSTEM_USER (a int);
 
118
drop table SYSTEM_USER;
 
119
create table TRIM(a int);
 
120
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
 
121
create table TRIM (a int);
 
122
drop table TRIM;
 
123
create table UNIQUE_USERS(a int);
 
124
drop table UNIQUE_USERS;
 
125
create table UNIQUE_USERS (a int);
 
126
drop table UNIQUE_USERS;
 
127
create table VARIANCE(a int);
 
128
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
 
129
create table VARIANCE (a int);
 
130
drop table VARIANCE;
 
131
create table VAR_POP(a int);
 
132
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
 
133
create table VAR_POP (a int);
 
134
drop table VAR_POP;
 
135
create table VAR_SAMP(a int);
 
136
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
 
137
create table VAR_SAMP (a int);
 
138
drop table VAR_SAMP;
 
139
set SQL_MODE='IGNORE_SPACE';
 
140
create table ADDDATE(a int);
 
141
drop table ADDDATE;
 
142
create table ADDDATE (a int);
 
143
drop table ADDDATE;
 
144
create table BIT_AND(a int);
 
145
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND(a int)' at line 1
 
146
create table BIT_AND (a int);
 
147
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_AND (a int)' at line 1
 
148
create table BIT_OR(a int);
 
149
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR(a int)' at line 1
 
150
create table BIT_OR (a int);
 
151
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_OR (a int)' at line 1
 
152
create table BIT_XOR(a int);
 
153
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR(a int)' at line 1
 
154
create table BIT_XOR (a int);
 
155
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BIT_XOR (a int)' at line 1
 
156
create table CAST(a int);
 
157
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST(a int)' at line 1
 
158
create table CAST (a int);
 
159
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CAST (a int)' at line 1
 
160
create table COUNT(a int);
 
161
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT(a int)' at line 1
 
162
create table COUNT (a int);
 
163
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COUNT (a int)' at line 1
 
164
create table CURDATE(a int);
 
165
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE(a int)' at line 1
 
166
create table CURDATE (a int);
 
167
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURDATE (a int)' at line 1
 
168
create table CURTIME(a int);
 
169
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME(a int)' at line 1
 
170
create table CURTIME (a int);
 
171
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURTIME (a int)' at line 1
 
172
create table DATE_ADD(a int);
 
173
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD(a int)' at line 1
 
174
create table DATE_ADD (a int);
 
175
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ADD (a int)' at line 1
 
176
create table DATE_SUB(a int);
 
177
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB(a int)' at line 1
 
178
create table DATE_SUB (a int);
 
179
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_SUB (a int)' at line 1
 
180
create table EXTRACT(a int);
 
181
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT(a int)' at line 1
 
182
create table EXTRACT (a int);
 
183
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTRACT (a int)' at line 1
 
184
create table GROUP_CONCAT(a int);
 
185
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(a int)' at line 1
 
186
create table GROUP_CONCAT (a int);
 
187
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT (a int)' at line 1
 
188
create table GROUP_UNIQUE_USERS(a int);
 
189
drop table GROUP_UNIQUE_USERS;
 
190
create table GROUP_UNIQUE_USERS (a int);
 
191
drop table GROUP_UNIQUE_USERS;
 
192
create table MAX(a int);
 
193
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(a int)' at line 1
 
194
create table MAX (a int);
 
195
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX (a int)' at line 1
 
196
create table MID(a int);
 
197
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID(a int)' at line 1
 
198
create table MID (a int);
 
199
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MID (a int)' at line 1
 
200
create table MIN(a int);
 
201
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN(a int)' at line 1
 
202
create table MIN (a int);
 
203
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MIN (a int)' at line 1
 
204
create table NOW(a int);
 
205
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW(a int)' at line 1
 
206
create table NOW (a int);
 
207
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW (a int)' at line 1
 
208
create table POSITION(a int);
 
209
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION(a int)' at line 1
 
210
create table POSITION (a int);
 
211
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POSITION (a int)' at line 1
 
212
create table SESSION_USER(a int);
 
213
drop table SESSION_USER;
 
214
create table SESSION_USER (a int);
 
215
drop table SESSION_USER;
 
216
create table STD(a int);
 
217
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD(a int)' at line 1
 
218
create table STD (a int);
 
219
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STD (a int)' at line 1
 
220
create table STDDEV(a int);
 
221
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV(a int)' at line 1
 
222
create table STDDEV (a int);
 
223
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV (a int)' at line 1
 
224
create table STDDEV_POP(a int);
 
225
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP(a int)' at line 1
 
226
create table STDDEV_POP (a int);
 
227
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_POP (a int)' at line 1
 
228
create table STDDEV_SAMP(a int);
 
229
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP(a int)' at line 1
 
230
create table STDDEV_SAMP (a int);
 
231
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STDDEV_SAMP (a int)' at line 1
 
232
create table SUBDATE(a int);
 
233
drop table SUBDATE;
 
234
create table SUBDATE (a int);
 
235
drop table SUBDATE;
 
236
create table SUBSTR(a int);
 
237
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR(a int)' at line 1
 
238
create table SUBSTR (a int);
 
239
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR (a int)' at line 1
 
240
create table SUBSTRING(a int);
 
241
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING(a int)' at line 1
 
242
create table SUBSTRING (a int);
 
243
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTRING (a int)' at line 1
 
244
create table SUM(a int);
 
245
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM(a int)' at line 1
 
246
create table SUM (a int);
 
247
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUM (a int)' at line 1
 
248
create table SYSDATE(a int);
 
249
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE(a int)' at line 1
 
250
create table SYSDATE (a int);
 
251
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSDATE (a int)' at line 1
 
252
create table SYSTEM_USER(a int);
 
253
drop table SYSTEM_USER;
 
254
create table SYSTEM_USER (a int);
 
255
drop table SYSTEM_USER;
 
256
create table TRIM(a int);
 
257
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM(a int)' at line 1
 
258
create table TRIM (a int);
 
259
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIM (a int)' at line 1
 
260
create table UNIQUE_USERS(a int);
 
261
drop table UNIQUE_USERS;
 
262
create table UNIQUE_USERS (a int);
 
263
drop table UNIQUE_USERS;
 
264
create table VARIANCE(a int);
 
265
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE(a int)' at line 1
 
266
create table VARIANCE (a int);
 
267
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARIANCE (a int)' at line 1
 
268
create table VAR_POP(a int);
 
269
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP(a int)' at line 1
 
270
create table VAR_POP (a int);
 
271
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_POP (a int)' at line 1
 
272
create table VAR_SAMP(a int);
 
273
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP(a int)' at line 1
 
274
create table VAR_SAMP (a int);
 
275
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VAR_SAMP (a int)' at line 1
 
276
DROP TABLE IF EXISTS table_25930_a;
 
277
DROP TABLE IF EXISTS table_25930_b;
 
278
SET SQL_MODE = 'ANSI_QUOTES';
 
279
CREATE TABLE table_25930_a ( "blah" INT );
 
280
CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
 
281
desc table_25930_b;
 
282
Field   Type    Null    Key     Default Extra
 
283
"blah" - 1      bigint(12)      YES             NULL    
 
284
DROP TABLE table_25930_a;
 
285
DROP TABLE table_25930_b;
 
286
SET @@sql_mode=@save_sql_mode;
 
287
DROP PROCEDURE IF EXISTS p26030;
 
288
select "non terminated"$$
 
289
non terminated
 
290
non terminated
 
291
select "terminated";$$
 
292
terminated
 
293
terminated
 
294
select "non terminated, space"      $$
 
295
non terminated, space
 
296
non terminated, space
 
297
select "terminated, space";      $$
 
298
terminated, space
 
299
terminated, space
 
300
select "non terminated, comment" /* comment */$$
 
301
non terminated, comment
 
302
non terminated, comment
 
303
select "terminated, comment"; /* comment */$$
 
304
terminated, comment
 
305
terminated, comment
 
306
select "stmt 1";select "stmt 2 non terminated"$$
 
307
stmt 1
 
308
stmt 1
 
309
stmt 2 non terminated
 
310
stmt 2 non terminated
 
311
select "stmt 1";select "stmt 2 terminated";$$
 
312
stmt 1
 
313
stmt 1
 
314
stmt 2 terminated
 
315
stmt 2 terminated
 
316
select "stmt 1";select "stmt 2 non terminated, space"      $$
 
317
stmt 1
 
318
stmt 1
 
319
stmt 2 non terminated, space
 
320
stmt 2 non terminated, space
 
321
select "stmt 1";select "stmt 2 terminated, space";      $$
 
322
stmt 1
 
323
stmt 1
 
324
stmt 2 terminated, space
 
325
stmt 2 terminated, space
 
326
select "stmt 1";select "stmt 2 non terminated, comment" /* comment */$$
 
327
stmt 1
 
328
stmt 1
 
329
stmt 2 non terminated, comment
 
330
stmt 2 non terminated, comment
 
331
select "stmt 1";select "stmt 2 terminated, comment"; /* comment */$$
 
332
stmt 1
 
333
stmt 1
 
334
stmt 2 terminated, comment
 
335
stmt 2 terminated, comment
 
336
select "stmt 1";             select "space, stmt 2"$$
 
337
stmt 1
 
338
stmt 1
 
339
space, stmt 2
 
340
space, stmt 2
 
341
select "stmt 1";/* comment */select "comment, stmt 2"$$
 
342
stmt 1
 
343
stmt 1
 
344
comment, stmt 2
 
345
comment, stmt 2
 
346
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() BEGIN SELECT 1; END; CALL p26030()
 
347
$$
 
348
1
 
349
1
 
350
DROP PROCEDURE IF EXISTS p26030; CREATE PROCEDURE p26030() SELECT 1; CALL p26030()
 
351
$$
 
352
1
 
353
1
 
354
DROP PROCEDURE p26030;
 
355
select pi(3.14);
 
356
ERROR 42000: Incorrect parameter count in the call to native function 'pi'
 
357
select tan();
 
358
ERROR 42000: Incorrect parameter count in the call to native function 'tan'
 
359
select tan(1, 2);
 
360
ERROR 42000: Incorrect parameter count in the call to native function 'tan'
 
361
select makedate(1);
 
362
ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
 
363
select makedate(1, 2, 3);
 
364
ERROR 42000: Incorrect parameter count in the call to native function 'makedate'
 
365
select maketime();
 
366
ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
 
367
select maketime(1);
 
368
ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
 
369
select maketime(1, 2);
 
370
ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
 
371
select maketime(1, 2, 3, 4);
 
372
ERROR 42000: Incorrect parameter count in the call to native function 'maketime'
 
373
select atan();
 
374
ERROR 42000: Incorrect parameter count in the call to native function 'atan'
 
375
select atan2(1, 2, 3);
 
376
ERROR 42000: Incorrect parameter count in the call to native function 'atan2'
 
377
select concat();
 
378
ERROR 42000: Incorrect parameter count in the call to native function 'concat'
 
379
select concat("foo");
 
380
concat("foo")
 
381
foo
 
382
select concat_ws();
 
383
ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
 
384
select concat_ws("foo");
 
385
ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
 
386
select encrypt();
 
387
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
 
388
select encrypt(1, 2, 3);
 
389
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
 
390
select des_encrypt("p1", "p2", "not expected");
 
391
ERROR 42000: Incorrect parameter count in the call to native function 'des_encrypt'
 
392
select des_decrypt("p1", "p2", "not expected");
 
393
ERROR 42000: Incorrect parameter count in the call to native function 'des_decrypt'
 
394
select elt();
 
395
ERROR 42000: Incorrect parameter count in the call to native function 'elt'
 
396
select elt(1);
 
397
ERROR 42000: Incorrect parameter count in the call to native function 'elt'
 
398
select export_set();
 
399
ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
 
400
select export_set("p1");
 
401
ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
 
402
select export_set("p1", "p2");
 
403
ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
 
404
select export_set("p1", "p2", "p3", "p4", "p5", "p6");
 
405
ERROR 42000: Incorrect parameter count in the call to native function 'export_set'
 
406
select field();
 
407
ERROR 42000: Incorrect parameter count in the call to native function 'field'
 
408
select field("p1");
 
409
ERROR 42000: Incorrect parameter count in the call to native function 'field'
 
410
select from_unixtime();
 
411
ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
 
412
select from_unixtime(1, 2, 3);
 
413
ERROR 42000: Incorrect parameter count in the call to native function 'from_unixtime'
 
414
select unix_timestamp(1, 2);
 
415
ERROR 42000: Incorrect parameter count in the call to native function 'unix_timestamp'
 
416
select greatest();
 
417
ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
 
418
select greatest(12);
 
419
ERROR 42000: Incorrect parameter count in the call to native function 'greatest'
 
420
select last_insert_id(1, 2);
 
421
ERROR 42000: Incorrect parameter count in the call to native function 'last_insert_id'
 
422
select least();
 
423
ERROR 42000: Incorrect parameter count in the call to native function 'least'
 
424
select least(12);
 
425
ERROR 42000: Incorrect parameter count in the call to native function 'least'
 
426
select locate();
 
427
ERROR 42000: Incorrect parameter count in the call to native function 'locate'
 
428
select locate(1);
 
429
ERROR 42000: Incorrect parameter count in the call to native function 'locate'
 
430
select locate(1, 2, 3, 4);
 
431
ERROR 42000: Incorrect parameter count in the call to native function 'locate'
 
432
select log();
 
433
ERROR 42000: Incorrect parameter count in the call to native function 'log'
 
434
select log(1, 2, 3);
 
435
ERROR 42000: Incorrect parameter count in the call to native function 'log'
 
436
select make_set();
 
437
ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
 
438
select make_set(1);
 
439
ERROR 42000: Incorrect parameter count in the call to native function 'make_set'
 
440
select master_pos_wait();
 
441
ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
 
442
select master_pos_wait(1);
 
443
ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
 
444
select master_pos_wait(1, 2, 3, 4);
 
445
ERROR 42000: Incorrect parameter count in the call to native function 'master_pos_wait'
 
446
select rand(1, 2, 3);
 
447
ERROR 42000: Incorrect parameter count in the call to native function 'rand'
 
448
select round(1, 2, 3);
 
449
ERROR 42000: Incorrect parameter count in the call to native function 'round'
 
450
select yearweek();
 
451
ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
 
452
select yearweek(1, 2, 3);
 
453
ERROR 42000: Incorrect parameter count in the call to native function 'yearweek'
 
454
select abs(3);
 
455
abs(3)
 
456
3
 
457
select abs(3 AS three);
 
458
ERROR 42000: Incorrect parameters in the call to native function 'abs'
 
459
select abs(3 three);
 
460
ERROR 42000: Incorrect parameters in the call to native function 'abs'
 
461
select abs(3 AS "three");
 
462
ERROR 42000: Incorrect parameters in the call to native function 'abs'
 
463
select abs(3 "three");
 
464
ERROR 42000: Incorrect parameters in the call to native function 'abs'
 
465
set @bar="bar";
 
466
set @foobar="foobar";
 
467
select instr("foobar", "bar");
 
468
instr("foobar", "bar")
 
469
4
 
470
select instr("foobar" AS p1, "bar");
 
471
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
472
select instr("foobar" p1, "bar");
 
473
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
474
select instr("foobar" AS "p1", "bar");
 
475
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
476
select instr("foobar" "p1", "bar");
 
477
instr("foobar" "p1", "bar")
 
478
4
 
479
select instr(@foobar "p1", "bar");
 
480
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
481
select instr("foobar", "bar" AS p2);
 
482
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
483
select instr("foobar", "bar" p2);
 
484
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
485
select instr("foobar", "bar" AS "p2");
 
486
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
487
select instr("foobar", "bar" "p2");
 
488
instr("foobar", "bar" "p2")
 
489
0
 
490
select instr("foobar", @bar "p2");
 
491
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
492
select instr("foobar" AS p1, "bar" AS p2);
 
493
ERROR 42000: Incorrect parameters in the call to native function 'instr'
 
494
select conv(255, 10, 16);
 
495
conv(255, 10, 16)
 
496
FF
 
497
select conv(255 AS p1, 10, 16);
 
498
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
499
select conv(255 p1, 10, 16);
 
500
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
501
select conv(255 AS "p1", 10, 16);
 
502
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
503
select conv(255 "p1", 10, 16);
 
504
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
505
select conv(255, 10 AS p2, 16);
 
506
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
507
select conv(255, 10 p2, 16);
 
508
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
509
select conv(255, 10 AS "p2", 16);
 
510
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
511
select conv(255, 10 "p2", 16);
 
512
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
513
select conv(255, 10, 16 AS p3);
 
514
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
515
select conv(255, 10, 16 p3);
 
516
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
517
select conv(255, 10, 16 AS "p3");
 
518
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
519
select conv(255, 10, 16 "p3");
 
520
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
521
select conv(255 AS p1, 10 AS p2, 16 AS p3);
 
522
ERROR 42000: Incorrect parameters in the call to native function 'conv'
 
523
select atan(10);
 
524
atan(10)
 
525
1.4711276743037347
 
526
select atan(10 AS p1);
 
527
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
528
select atan(10 p1);
 
529
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
530
select atan(10 AS "p1");
 
531
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
532
select atan(10 "p1");
 
533
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
534
select atan(10, 20);
 
535
atan(10, 20)
 
536
0.4636476090008061
 
537
select atan(10 AS p1, 20);
 
538
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
539
select atan(10 p1, 20);
 
540
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
541
select atan(10 AS "p1", 20);
 
542
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
543
select atan(10 "p1", 20);
 
544
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
545
select atan(10, 20 AS p2);
 
546
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
547
select atan(10, 20 p2);
 
548
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
549
select atan(10, 20 AS "p2");
 
550
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
551
select atan(10, 20 "p2");
 
552
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
553
select atan(10 AS p1, 20 AS p2);
 
554
ERROR 42000: Incorrect parameters in the call to native function 'atan'
 
555
DROP TABLE IF EXISTS t1;
 
556
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
 
557
STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
 
558
22:10:00
 
559
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
 
560
STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE
 
561
22:01:00
 
562
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
 
563
"1997-12-31 23:59:59" + INTERVAL 1 SECOND
 
564
1998-01-01 00:00:00
 
565
SELECT 1 + INTERVAL(1,0,1,2) + 1;
 
566
1 + INTERVAL(1,0,1,2) + 1
 
567
4
 
568
SELECT INTERVAL(1^1,0,1,2) + 1;
 
569
INTERVAL(1^1,0,1,2) + 1
 
570
2
 
571
SELECT INTERVAL(1,0+1,2,3) * 5.5;
 
572
INTERVAL(1,0+1,2,3) * 5.5
 
573
5.5
 
574
SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
 
575
INTERVAL(3,3,1+3,4+4) / 0.5
 
576
2.0000
 
577
SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
 
578
(INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2
 
579
50.0000
 
580
SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
 
581
INTERVAL(1,0,1,2) + 1   5 * INTERVAL(1,0,1,2)
 
582
3       10
 
583
SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
 
584
INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3)
 
585
2
 
586
SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
 
587
1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND
 
588
NULL
 
589
SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
 
590
1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND
 
591
NULL
 
592
CREATE TABLE t1 (a INT, b DATETIME);
 
593
INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
 
594
SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
 
595
a       b
 
596
3       1998-01-01 00:00:00
 
597
DROP TABLE t1;
 
598
DROP TABLE IF EXISTS t1,t2,t3;
 
599
CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
 
600
CREATE TABLE t2 LIKE t1;
 
601
CREATE TABLE t3 LIKE t1;
 
602
SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
 
603
a1      a2      a3      a4
 
604
SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
 
605
a1      a2      a3      a4      a1      a2      a3      a4
 
606
SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
 
607
a1      a2      a3      a4      a1      a2      a3      a4
 
608
SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
 
609
a1      a2      a3      a4      a1      a2      a3      a4
 
610
SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
 
611
a1      a2      a3      a4      a1      a2      a3      a4
 
612
SELECT {fn CONCAT(a1,a2)} FROM t1;
 
613
{fn CONCAT(a1,a2)}
 
614
UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
 
615
SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
 
616
a1      a4
 
617
DROP TABLE t1, t2, t3;
 
618
#
 
619
# End of 5.1 tests
 
620
#
 
621
# Should use myisam
 
622
create logfile group ndb_lg1 add undofile 'ndb_undo1' initial_size=32M;
 
623
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
624
create logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
 
625
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
626
create logfile group ndb_lg1 add undofile 'ndb_undo1';
 
627
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
628
create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam initial_size=32M;
 
629
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
630
create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1 engine=myisam;
 
631
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
632
create tablespace ndb_ts1 add datafile 'ndb_ts1.dat' use logfile group ndb_lg1;
 
633
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
634
alter logfile group ndb_lg1 add undofile 'ndb_undo1' wait;
 
635
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
636
alter logfile group ndb_lg1 add undofile 'ndb_undo1' engine=myisam;
 
637
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
638
alter logfile group ndb_lg1 add undofile 'ndb_undo1';
 
639
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
640
alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' initial_size=32M;
 
641
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
642
alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat' engine=myisam;
 
643
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
644
alter tablespace ndb_ts1 add datafile 'ndb_ts1.dat';
 
645
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
646
drop logfile group ndb_lg1 engine=myisam;
 
647
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
648
drop logfile group ndb_lg1;
 
649
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
650
drop tablespace ndb_ts1 engine=myisam;
 
651
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
652
drop tablespace ndb_ts1;
 
653
ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 
654
CREATE TABLE t (id INT PRIMARY KEY);
 
655
ALTER TABLE t RENAME TO `t1';;
 
656
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`t1'' at line 1
 
657
DROP TABLE t;
 
658
#
 
659
# Bug#13819100 BROKEN SYNTAX ACCEPTED FOR START SLAVE, STOP SLAVE
 
660
#
 
661
STOP SLAVE ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;
 
662
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' at line 1
 
663
STOP SLAVE ,,,,,,,,,,,,, sql_thread, ,,,,,,,,,,,,,,,,,,, ;
 
664
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,, sql_thread, ,,,,,,,,,,,,,,,,,,,' at line 1
 
665
STOP SLAVE ,,,,,,,,,,,,, io_thread, ,,,,,,,,,,,,,,,,,,, ;
 
666
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,, io_thread, ,,,,,,,,,,,,,,,,,,,' at line 1
 
667
#
 
668
# Bug#13819132 BROKEN SYNTAX ACCEPTED FOR START TRANSACTION
 
669
#
 
670
START TRANSACTION ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;
 
671
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' at line 1