~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1;
2
create table t1(a int);
3
insert into t1 values(1);
4
ERROR at line 9: DELIMITER must be followed by a 'delimiter' character or string
5
6
Test default delimiter ;
7
a
8
1
9
10
Test delimiter without arg
11
12
Test delimiter :
13
a
14
1
15
16
Test delimiter :
17
a
18
1
19
20
Test delimiter :;
21
a
22
1
23
24
Test delimiter //
25
a
26
1
27
28
Test delimiter MySQL
29
a
30
1
31
32
Test delimiter delimiter
33
a
34
1
35
Tables_in_test
36
t1
37
t2
38
t3
39
Tables_in_test
40
t1
41
_
42
Test delimiter : from command line
43
a
44
1
45
_
46
Test delimiter :; from command line
47
a
48
1
49
_
50
Test 'go' command(vertical output) G
51
*************************** 1. row ***************************
52
a: 1
53
_
54
Test  'go' command g
55
a
56
1
57
drop table t1;
58
create table t1(a int);
59
lock tables t1 write;
60
database()
61
test
62
unlock tables;
63
drop table t1;
64
+----------------------+------------+--------+
65
| concat('>',col1,'<') | col2       | col3   |
66
+----------------------+------------+--------+
67
| >a   <               | b          | 123421 | 
68
| >a   <               | 0123456789 |      4 | 
69
| >abcd<               |            |      4 | 
70
+----------------------+------------+--------+
71
+-------------------+
72
| __tañgè Ñãmé      |
73
+-------------------+
74
| John Doe          | 
75
+-------------------+
76
+-------------------+
77
| John Doe          |
78
+-------------------+
79
| __tañgè Ñãmé      | 
80
+-------------------+
81
+------+------+---------------------------+
82
| i    | j    | k                         |
83
+------+------+---------------------------+
84
|    1 | NULL | NULL                      | 
85
| NULL | NULL | <-----------------------> | 
86
| NULL | NULL | <-----                    | 
87
| NULL | NULL | Τη γλώσσα                 | 
88
| NULL | NULL | ᛖᚴ ᚷᛖᛏ                    | 
89
+------+------+---------------------------+
90
i	j	k
91
NULL	1	NULL
92
Field	Type	Null	Key	Default	Extra
93
i	int(11)	YES		NULL	
94
j	int(11)	NO		NULL	
95
k	int(11)	YES		NULL	
96
+------+---+------+
97
| i    | j | k    |
98
+------+---+------+
99
| NULL | 1 | NULL | 
100
+------+---+------+
101
+-------+---------+------+-----+---------+-------+
102
| Field | Type    | Null | Key | Default | Extra |
103
+-------+---------+------+-----+---------+-------+
104
| i     | int(11) | YES  |     | NULL    |       | 
105
| j     | int(11) | NO   |     | NULL    |       | 
106
| k     | int(11) | YES  |     | NULL    |       | 
107
+-------+---------+------+-----+---------+-------+
108
i	s1
109
1	x
110
2	NULL
111
3	
112
+------+------+
113
| i    | s1   |
114
+------+------+
115
|    1 | x    | 
116
|    2 | NULL | 
117
|    3 |      | 
118
+------+------+
119
unhex('zz')
120
NULL
121
+-------------+
122
| unhex('zz') |
123
+-------------+
124
| NULL        | 
125
+-------------+
126
create table t1(a int, b varchar(255), c int);
127
Field	Type	Null	Key	Default	Extra
128
a	int(11)	YES		NULL	
129
b	varchar(255)	YES		NULL	
130
c	int(11)	YES		NULL	
131
Field	Type	Null	Key	Default	Extra
132
a	int(11)	YES		NULL	
133
b	varchar(255)	YES		NULL	
134
c	int(11)	YES		NULL	
135
drop table t1;
136
1
137
1
138
ERROR 1064 (42000) at line 3: 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
139
ERROR at line 1: USE must be followed by a database name
140
\
141
\\
142
';
143
';
144
create table t17583 (a int);
145
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
146
insert into t17583 select a from t17583;
147
insert into t17583 select a from t17583;
148
insert into t17583 select a from t17583;
149
insert into t17583 select a from t17583;
150
insert into t17583 select a from t17583;
151
insert into t17583 select a from t17583;
152
insert into t17583 select a from t17583;
153
select count(*) from t17583;
154
count(*)
155
1280
156
drop table t17583;
157
Test connect without db- or host-name => reconnect
158
Test connect with dbname only => new dbname, old hostname
159
ERROR 1064 (42000) at line 1: 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 'connecttest' at line 1
160
Test connect with _invalid_ dbname only => new invalid dbname, old hostname
161
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
162
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
163
Test connect with dbname + hostname
164
Test connect with dbname + _invalid_ hostname
165
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
166
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
167
The commands reported in the bug report
168
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
169
Too long dbname
170
ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
171
Too long hostname
172
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
173
1
174
1
175
ERROR at line 1: DELIMITER cannot contain a backslash character
176
ERROR at line 1: DELIMITER cannot contain a backslash character
177
1
178
1
179
1
180
1
181
This is a file starting with UTF8 BOM 0xEFBBBF
182
This is a file starting with UTF8 BOM 0xEFBBBF
183
End of 5.0 tests
184
WARNING: --server-arg option not supported in this configuration.
185
*************************** 1. row ***************************
186
1: 1
187
2: 2
188
3: 3
189
4: 4
190
5: 5
191
6: 6
192
7: 7
193
8: 8
194
9: 9
195
0: 0
196
1: 1
197
2: 2
198
3: 3
199
4: 4
200
5: 5
201
6: 6
202
7: 7
203
8: 8
204
9: 9
205
0: 0
206
1: 1
207
2: 2
208
3: 3
209
4: 4
210
5: 5
211
6: 6
212
7: 7
213
8: 8
214
9: 9
215
0: 0
216
1: 1
217
2: 2
218
3: 3
219
4: 4
220
5: 5
221
6: 6
222
7: 7
223
8: 8
224
9: 9
225
0: 0
226
1: 1
227
2: 2
228
3: 3
229
4: 4
230
5: 5
231
6: 6
232
7: 7
233
8: 8
234
9: 9
235
0: 0
236
1: 1
237
2: 2
238
3: 3
239
4: 4
240
5: 5
241
6: 6
242
7: 7
243
8: 8
244
9: 9
245
0: 0
246
1: 1
247
2: 2
248
3: 3
249
4: 4
250
5: 5
251
6: 6
252
7: 7
253
8: 8
254
9: 9
255
0: 0
256
1: 1
257
2: 2
258
3: 3
259
4: 4
260
5: 5
261
6: 6
262
7: 7
263
8: 8
264
9: 9
265
0: 0
266
1: 1
267
2: 2
268
3: 3
269
4: 4
270
5: 5
271
6: 6
272
7: 7
273
8: 8
274
9: 9
275
0: 0
276
1: 1
277
2: 2
278
3: 3
279
4: 4
280
5: 5
281
6: 6
282
7: 7
283
8: 8
284
9: 9
285
0: 0
286
1: 1
287
2: 2
288
3: 3
289
4: 4
290
5: 5
291
6: 6
292
7: 7
293
8: 8
294
9: 9
295
0: 0
296
1: 1
297
2: 2
298
3: 3
299
4: 4
300
5: 5
301
6: 6
302
7: 7
303
8: 8
304
9: 9
305
0: 0
306
1: 1
307
2: 2
308
3: 3
309
4: 4
310
5: 5
311
6: 6
312
7: 7
313
8: 8
314
9: 9
315
0: 0
316
1: 1
317
2: 2
318
3: 3
319
4: 4
320
5: 5
321
6: 6
322
7: 7
323
8: 8
324
9: 9
325
0: 0
326
1: 1
327
2: 2
328
3: 3
329
4: 4
330
5: 5
331
6: 6
332
7: 7
333
8: 8
334
9: 9
335
0: 0
336
1: 1
337
2: 2
338
3: 3
339
4: 4
340
5: 5
341
6: 6
342
7: 7
343
8: 8
344
9: 9
345
0: 0
346
1: 1
347
2: 2
348
3: 3
349
4: 4
350
5: 5
351
6: 6
352
7: 7
353
8: 8
354
9: 9
355
0: 0
356
1: 1
357
2: 2
358
3: 3
359
4: 4
360
5: 5
361
6: 6
362
7: 7
363
8: 8
364
9: 9
365
0: 0
366
1: 1
367
2: 2
368
3: 3
369
4: 4
370
5: 5
371
6: 6
372
7: 7
373
8: 8
374
9: 9
375
0: 0
376
+---+
377
| 1 |
378
+---+
379
| 1 | 
380
+---+
381
Warning (Code 1286): Unknown table engine 'nonexistent'
382
Warning (Code 1266): Using storage engine MyISAM for table 't2'
383
Warning (Code 1286): Unknown table engine 'nonexistent2'
384
Warning (Code 1266): Using storage engine MyISAM for table 't2'
385
Error (Code 1050): Table 't2' already exists
386
drop tables t1, t2;
387
End of tests