~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/parser.result

  • Committer: Monty Taylor
  • Date: 2008-10-20 08:48:34 UTC
  • mfrom: (520.1.22 drizzle)
  • Revision ID: monty@inaugust.com-20081020084834-xpb3w01vkcp55o02
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
SET @save_sql_mode=@@sql_mode;
2
 
set SQL_MODE='';
3
1
create table ADDDATE(a int);
4
2
drop table ADDDATE;
5
3
create table ADDDATE (a int);
6
4
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
5
create table CAST(a int);
20
6
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
7
create table CAST (a int);
22
 
drop table CAST;
 
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 'CAST (a int)' at line 1
23
9
create table COUNT(a int);
24
10
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
11
create table COUNT (a int);
26
 
drop table COUNT;
 
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 'COUNT (a int)' at line 1
27
13
create table CURDATE(a int);
28
14
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
15
create table CURDATE (a int);
30
 
drop table CURDATE;
 
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 'CURDATE (a int)' at line 1
31
17
create table CURTIME(a int);
32
18
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
19
create table CURTIME (a int);
34
 
drop table CURTIME;
 
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 'CURTIME (a int)' at line 1
35
21
create table DATE_ADD(a int);
36
22
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
23
create table DATE_ADD (a int);
38
 
drop table DATE_ADD;
 
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 'DATE_ADD (a int)' at line 1
39
25
create table DATE_SUB(a int);
40
26
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
27
create table DATE_SUB (a int);
42
 
drop table DATE_SUB;
 
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 'DATE_SUB (a int)' at line 1
43
29
create table EXTRACT(a int);
44
30
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
31
create table EXTRACT (a int);
46
 
drop table EXTRACT;
 
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 'EXTRACT (a int)' at line 1
47
33
create table GROUP_CONCAT(a int);
48
34
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
35
create table GROUP_CONCAT (a int);
50
 
drop table GROUP_CONCAT;
 
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 'GROUP_CONCAT (a int)' at line 1
51
37
create table GROUP_UNIQUE_USERS(a int);
52
38
drop table GROUP_UNIQUE_USERS;
53
39
create table GROUP_UNIQUE_USERS (a int);
55
41
create table MAX(a int);
56
42
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
43
create table MAX (a int);
58
 
drop table MAX;
 
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 'MAX (a int)' at line 1
59
45
create table MID(a int);
60
46
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
47
create table MID (a int);
62
 
drop table MID;
 
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 'MID (a int)' at line 1
63
49
create table MIN(a int);
64
50
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
51
create table MIN (a int);
66
 
drop table MIN;
 
52
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
67
53
create table NOW(a int);
68
54
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
55
create table NOW (a int);
70
 
drop table NOW;
 
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 'NOW (a int)' at line 1
71
57
create table POSITION(a int);
72
58
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
59
create table POSITION (a int);
74
 
drop table POSITION;
 
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 'POSITION (a int)' at line 1
75
61
create table SESSION_USER(a int);
76
62
drop table SESSION_USER;
77
63
create table SESSION_USER (a int);
79
65
create table STD(a int);
80
66
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
67
create table STD (a int);
82
 
drop table STD;
 
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 'STD (a int)' at line 1
83
69
create table STDDEV(a int);
84
70
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
71
create table STDDEV (a int);
86
 
drop table STDDEV;
 
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 'STDDEV (a int)' at line 1
87
73
create table STDDEV_POP(a int);
88
74
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
75
create table STDDEV_POP (a int);
90
 
drop table STDDEV_POP;
 
76
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
91
77
create table STDDEV_SAMP(a int);
92
78
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
79
create table STDDEV_SAMP (a int);
94
 
drop table STDDEV_SAMP;
 
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 'STDDEV_SAMP (a int)' at line 1
95
81
create table SUBDATE(a int);
96
82
drop table SUBDATE;
97
83
create table SUBDATE (a int);
99
85
create table SUBSTR(a int);
100
86
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
87
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;
 
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 'SUBSTR (a int)' at line 1
107
89
create table SUM(a int);
108
90
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
91
create table SUM (a int);
110
 
drop table SUM;
 
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 'SUM (a int)' at line 1
111
93
create table SYSDATE(a int);
112
94
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
95
create table SYSDATE (a int);
114
 
drop table SYSDATE;
 
96
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
115
97
create table SYSTEM_USER(a int);
116
98
drop table SYSTEM_USER;
117
99
create table SYSTEM_USER (a int);
119
101
create table TRIM(a int);
120
102
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
103
create table TRIM (a int);
122
 
drop table TRIM;
 
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 'TRIM (a int)' at line 1
123
105
create table UNIQUE_USERS(a int);
124
106
drop table UNIQUE_USERS;
125
107
create table UNIQUE_USERS (a int);
127
109
create table VARIANCE(a int);
128
110
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
111
create table VARIANCE (a int);
130
 
drop table VARIANCE;
 
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 'VARIANCE (a int)' at line 1
131
113
create table VAR_POP(a int);
132
114
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
115
create table VAR_POP (a int);
134
 
drop table VAR_POP;
 
116
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
135
117
create table VAR_SAMP(a int);
136
118
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
119
create table VAR_SAMP (a int);
138
 
drop table VAR_SAMP;
139
 
set SQL_MODE='IGNORE_SPACE';
 
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 'VAR_SAMP (a int)' at line 1
140
121
create table ADDDATE(a int);
141
122
drop table ADDDATE;
142
123
create table ADDDATE (a int);
143
124
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
125
create table CAST(a int);
157
126
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
127
create table CAST (a int);
275
244
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
245
DROP TABLE IF EXISTS table_25930_a;
277
246
DROP TABLE IF EXISTS table_25930_b;
278
 
SET SQL_MODE = 'ANSI_QUOTES';
279
247
CREATE TABLE table_25930_a ( "blah" INT );
 
248
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 '"blah" INT )' at line 1
 
249
CREATE TABLE table_25930_a ( blah INT );
280
250
CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
281
251
desc table_25930_b;
282
252
Field   Type    Null    Key     Default Extra
283
 
"blah" - 1      bigint(12)      YES             NULL    
 
253
"blah" - 1      double  NO              NULL    
284
254
DROP TABLE table_25930_a;
285
255
DROP TABLE table_25930_b;
286
 
SET @@sql_mode=@save_sql_mode;
287
256
select pi(3.14);
288
257
ERROR 42000: Incorrect parameter count in the call to native function 'pi'
289
258
select tan();
315
284
ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
316
285
select concat_ws("foo");
317
286
ERROR 42000: Incorrect parameter count in the call to native function 'concat_ws'
318
 
select encrypt();
319
 
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
320
 
select encrypt(1, 2, 3);
321
 
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
322
 
select des_encrypt("p1", "p2", "not expected");
323
 
ERROR 42000: Incorrect parameter count in the call to native function 'des_encrypt'
324
 
select des_decrypt("p1", "p2", "not expected");
325
 
ERROR 42000: Incorrect parameter count in the call to native function 'des_decrypt'
326
287
select elt();
327
288
ERROR 42000: Incorrect parameter count in the call to native function 'elt'
328
289
select elt(1);
497
458
SELECT 1 + INTERVAL(1,0,1,2) + 1;
498
459
1 + INTERVAL(1,0,1,2) + 1
499
460
4
500
 
SELECT INTERVAL(1^1,0,1,2) + 1;
501
 
INTERVAL(1^1,0,1,2) + 1
502
 
2
 
461
SELECT INTERVAL(1,0,1,2) + 1;
 
462
INTERVAL(1,0,1,2) + 1
 
463
3
503
464
SELECT INTERVAL(1,0+1,2,3) * 5.5;
504
465
INTERVAL(1,0+1,2,3) * 5.5
505
466
5.5
515
476
SELECT INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3);
516
477
INTERVAL(0,(1*5)/2) + INTERVAL(5,4,3)
517
478
2
518
 
SELECT 1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND;
519
 
1^1 + INTERVAL 1+1 SECOND & 1 + INTERVAL 1+1 SECOND
520
 
NULL
521
 
SELECT 1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND;
522
 
1%2 - INTERVAL 1^1 SECOND | 1%2 - INTERVAL 1^1 SECOND
523
 
NULL
524
479
CREATE TABLE t1 (a INT, b DATETIME);
525
480
INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
526
481
SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
548
503
a1      a4
549
504
DROP TABLE t1, t2, t3;
550
505
BACKUP DATABASE *, test to 'broken.bak';
551
 
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 ' test to 'broken.bak'' at line 1
 
506
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 'BACKUP DATABASE *, test to 'broken.bak'' at line 1
552
507
BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';
553
 
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 ' db1, db2, db3 to 'broken.bak'' at line 1
 
508
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 'BACKUP DATABASE *, db1, db2, db3 to 'broken.bak'' at line 1