2
# This file contains tests covering the parser
5
#=============================================================================
7
#=============================================================================
9
SET @save_sql_mode=@@sql_mode;
12
# Documenting the current behavior, to detect incompatible changes.
14
# - no error is the correct result
15
# - an error is the expected result with the current implementation,
16
# and is a limitation.
20
create table ADDDATE(a int);
22
create table ADDDATE (a int);
25
--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
create table CAST(a int);
42
create table CAST (a int);
45
--error ER_PARSE_ERROR
46
create table COUNT(a int);
47
create table COUNT (a int);
50
--error ER_PARSE_ERROR
51
create table CURDATE(a int);
52
create table CURDATE (a int);
55
--error ER_PARSE_ERROR
56
create table CURTIME(a int);
57
create table CURTIME (a int);
60
--error ER_PARSE_ERROR
61
create table DATE_ADD(a int);
62
create table DATE_ADD (a int);
65
--error ER_PARSE_ERROR
66
create table DATE_SUB(a int);
67
create table DATE_SUB (a int);
70
--error ER_PARSE_ERROR
71
create table EXTRACT(a int);
72
create table EXTRACT (a int);
75
--error ER_PARSE_ERROR
76
create table GROUP_CONCAT(a int);
77
create table GROUP_CONCAT (a int);
78
drop table GROUP_CONCAT;
80
# Limitation removed in 5.1
81
create table GROUP_UNIQUE_USERS(a int);
82
drop table GROUP_UNIQUE_USERS;
83
create table GROUP_UNIQUE_USERS (a int);
84
drop table GROUP_UNIQUE_USERS;
86
--error ER_PARSE_ERROR
87
create table MAX(a int);
88
create table MAX (a int);
91
--error ER_PARSE_ERROR
92
create table MID(a int);
93
create table MID (a int);
96
--error ER_PARSE_ERROR
97
create table MIN(a int);
98
create table MIN (a int);
101
--error ER_PARSE_ERROR
102
create table NOW(a int);
103
create table NOW (a int);
106
--error ER_PARSE_ERROR
107
create table POSITION(a int);
108
create table POSITION (a int);
111
create table SESSION_USER(a int);
112
drop table SESSION_USER;
113
create table SESSION_USER (a int);
114
drop table SESSION_USER;
116
--error ER_PARSE_ERROR
117
create table STD(a int);
118
create table STD (a int);
121
--error ER_PARSE_ERROR
122
create table STDDEV(a int);
123
create table STDDEV (a int);
126
--error ER_PARSE_ERROR
127
create table STDDEV_POP(a int);
128
create table STDDEV_POP (a int);
129
drop table STDDEV_POP;
131
--error ER_PARSE_ERROR
132
create table STDDEV_SAMP(a int);
133
create table STDDEV_SAMP (a int);
134
drop table STDDEV_SAMP;
136
create table SUBDATE(a int);
138
create table SUBDATE (a int);
141
--error ER_PARSE_ERROR
142
create table SUBSTR(a int);
143
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
--error ER_PARSE_ERROR
152
create table SUM(a int);
153
create table SUM (a int);
156
--error ER_PARSE_ERROR
157
create table SYSDATE(a int);
158
create table SYSDATE (a int);
161
create table SYSTEM_USER(a int);
162
drop table SYSTEM_USER;
163
create table SYSTEM_USER (a int);
164
drop table SYSTEM_USER;
166
--error ER_PARSE_ERROR
167
create table TRIM(a int);
168
create table TRIM (a int);
171
# Limitation removed in 5.1
172
create table UNIQUE_USERS(a int);
173
drop table UNIQUE_USERS;
174
create table UNIQUE_USERS (a int);
175
drop table UNIQUE_USERS;
177
--error ER_PARSE_ERROR
178
create table VARIANCE(a int);
179
create table VARIANCE (a int);
182
--error ER_PARSE_ERROR
183
create table VAR_POP(a int);
184
create table VAR_POP (a int);
187
--error ER_PARSE_ERROR
188
create table VAR_SAMP(a int);
189
create table VAR_SAMP (a int);
192
set SQL_MODE='IGNORE_SPACE';
194
create table ADDDATE(a int);
196
create table ADDDATE (a int);
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
--error ER_PARSE_ERROR
215
create table CAST(a int);
216
--error ER_PARSE_ERROR
217
create table CAST (a int);
219
--error ER_PARSE_ERROR
220
create table COUNT(a int);
221
--error ER_PARSE_ERROR
222
create table COUNT (a int);
224
--error ER_PARSE_ERROR
225
create table CURDATE(a int);
226
--error ER_PARSE_ERROR
227
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
--error ER_PARSE_ERROR
235
create table DATE_ADD(a int);
236
--error ER_PARSE_ERROR
237
create table DATE_ADD (a int);
239
--error ER_PARSE_ERROR
240
create table DATE_SUB(a int);
241
--error ER_PARSE_ERROR
242
create table DATE_SUB (a int);
244
--error ER_PARSE_ERROR
245
create table EXTRACT(a int);
246
--error ER_PARSE_ERROR
247
create table EXTRACT (a int);
249
--error ER_PARSE_ERROR
250
create table GROUP_CONCAT(a int);
251
--error ER_PARSE_ERROR
252
create table GROUP_CONCAT (a int);
254
# Limitation removed in 5.1
255
create table GROUP_UNIQUE_USERS(a int);
256
drop table GROUP_UNIQUE_USERS;
257
create table GROUP_UNIQUE_USERS (a int);
258
drop table GROUP_UNIQUE_USERS;
260
--error ER_PARSE_ERROR
261
create table MAX(a int);
262
--error ER_PARSE_ERROR
263
create table MAX (a int);
265
--error ER_PARSE_ERROR
266
create table MID(a int);
267
--error ER_PARSE_ERROR
268
create table MID (a int);
270
--error ER_PARSE_ERROR
271
create table MIN(a int);
272
--error ER_PARSE_ERROR
273
create table MIN (a int);
275
--error ER_PARSE_ERROR
276
create table NOW(a int);
277
--error ER_PARSE_ERROR
278
create table NOW (a int);
280
--error ER_PARSE_ERROR
281
create table POSITION(a int);
282
--error ER_PARSE_ERROR
283
create table POSITION (a int);
285
create table SESSION_USER(a int);
286
drop table SESSION_USER;
287
create table SESSION_USER (a int);
288
drop table SESSION_USER;
290
--error ER_PARSE_ERROR
291
create table STD(a int);
292
--error ER_PARSE_ERROR
293
create table STD (a int);
295
--error ER_PARSE_ERROR
296
create table STDDEV(a int);
297
--error ER_PARSE_ERROR
298
create table STDDEV (a int);
300
--error ER_PARSE_ERROR
301
create table STDDEV_POP(a int);
302
--error ER_PARSE_ERROR
303
create table STDDEV_POP (a int);
305
--error ER_PARSE_ERROR
306
create table STDDEV_SAMP(a int);
307
--error ER_PARSE_ERROR
308
create table STDDEV_SAMP (a int);
310
create table SUBDATE(a int);
312
create table SUBDATE (a int);
315
--error ER_PARSE_ERROR
316
create table SUBSTR(a int);
317
--error ER_PARSE_ERROR
318
create table SUBSTR (a int);
320
--error ER_PARSE_ERROR
321
create table SUBSTRING(a int);
322
--error ER_PARSE_ERROR
323
create table SUBSTRING (a int);
325
--error ER_PARSE_ERROR
326
create table SUM(a int);
327
--error ER_PARSE_ERROR
328
create table SUM (a int);
330
--error ER_PARSE_ERROR
331
create table SYSDATE(a int);
332
--error ER_PARSE_ERROR
333
create table SYSDATE (a int);
335
create table SYSTEM_USER(a int);
336
drop table SYSTEM_USER;
337
create table SYSTEM_USER (a int);
338
drop table SYSTEM_USER;
340
--error ER_PARSE_ERROR
341
create table TRIM(a int);
342
--error ER_PARSE_ERROR
343
create table TRIM (a int);
345
# Limitation removed in 5.1
346
create table UNIQUE_USERS(a int);
347
drop table UNIQUE_USERS;
348
create table UNIQUE_USERS (a int);
349
drop table UNIQUE_USERS;
351
--error ER_PARSE_ERROR
352
create table VARIANCE(a int);
353
--error ER_PARSE_ERROR
354
create table VARIANCE (a int);
356
--error ER_PARSE_ERROR
357
create table VAR_POP(a int);
358
--error ER_PARSE_ERROR
359
create table VAR_POP (a int);
361
--error ER_PARSE_ERROR
362
create table VAR_SAMP(a int);
363
--error ER_PARSE_ERROR
364
create table VAR_SAMP (a int);
367
# Bug#25930 (CREATE TABLE x SELECT ... parses columns wrong when ran with
372
DROP TABLE IF EXISTS table_25930_a;
373
DROP TABLE IF EXISTS table_25930_b;
376
SET SQL_MODE = 'ANSI_QUOTES';
377
CREATE TABLE table_25930_a ( "blah" INT );
378
CREATE TABLE table_25930_b SELECT "blah" - 1 FROM table_25930_a;
380
# The lexer used to chop the first <">,
381
# not marking the start of the token "blah" correctly.
384
DROP TABLE table_25930_a;
385
DROP TABLE table_25930_b;
388
SET @@sql_mode=@save_sql_mode;
390
#=============================================================================
391
# SYNTACTIC PARSER (bison)
392
#=============================================================================
396
# Bug#21114 (Foreign key creation fails to table with name format)
399
# Test coverage with edge conditions
401
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
404
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
406
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
409
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
411
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
412
select makedate(1, 2, 3);
414
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
416
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
418
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
419
select maketime(1, 2);
420
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
421
select maketime(1, 2, 3, 4);
423
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
425
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
426
select atan2(1, 2, 3);
428
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
430
select concat("foo");
432
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
434
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
435
select concat_ws("foo");
437
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
439
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
440
select encrypt(1, 2, 3);
442
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
443
select des_encrypt("p1", "p2", "not expected");
444
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
445
select des_decrypt("p1", "p2", "not expected");
447
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
449
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
452
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
454
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
455
select export_set("p1");
456
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
457
select export_set("p1", "p2");
458
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
459
select export_set("p1", "p2", "p3", "p4", "p5", "p6");
461
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
463
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
466
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
467
select from_unixtime();
468
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
469
select from_unixtime(1, 2, 3);
471
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
472
select unix_timestamp(1, 2);
474
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
476
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
479
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
480
select last_insert_id(1, 2);
482
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
484
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
487
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
489
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
491
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
492
select locate(1, 2, 3, 4);
494
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
496
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
499
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
501
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
504
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
505
select master_pos_wait();
506
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
507
select master_pos_wait(1);
508
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
509
select master_pos_wait(1, 2, 3, 4);
511
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
512
select rand(1, 2, 3);
514
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
515
select round(1, 2, 3);
517
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
519
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
520
select yearweek(1, 2, 3);
523
# Bug#24736: UDF functions parsed as Stored Functions
526
# Verify that the syntax for calling UDF : foo(expr AS param, ...)
527
# can not be used when calling native functions
529
# Native function with 1 argument
532
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
533
select abs(3 AS three);
534
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
536
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
537
select abs(3 AS "three");
538
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
539
select abs(3 "three");
541
# Native function with 2 arguments
544
set @foobar="foobar";
546
select instr("foobar", "bar");
547
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
548
select instr("foobar" AS p1, "bar");
549
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
550
select instr("foobar" p1, "bar");
551
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
552
select instr("foobar" AS "p1", "bar");
553
## String concatenation, valid syntax
554
select instr("foobar" "p1", "bar");
555
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
556
select instr(@foobar "p1", "bar");
557
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
558
select instr("foobar", "bar" AS p2);
559
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
560
select instr("foobar", "bar" p2);
561
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
562
select instr("foobar", "bar" AS "p2");
563
## String concatenation, valid syntax
564
select instr("foobar", "bar" "p2");
565
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
566
select instr("foobar", @bar "p2");
567
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
568
select instr("foobar" AS p1, "bar" AS p2);
570
# Native function with 3 arguments
572
select conv(255, 10, 16);
573
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
574
select conv(255 AS p1, 10, 16);
575
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
576
select conv(255 p1, 10, 16);
577
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
578
select conv(255 AS "p1", 10, 16);
579
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
580
select conv(255 "p1", 10, 16);
581
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
582
select conv(255, 10 AS p2, 16);
583
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
584
select conv(255, 10 p2, 16);
585
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
586
select conv(255, 10 AS "p2", 16);
587
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
588
select conv(255, 10 "p2", 16);
589
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
590
select conv(255, 10, 16 AS p3);
591
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
592
select conv(255, 10, 16 p3);
593
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
594
select conv(255, 10, 16 AS "p3");
595
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
596
select conv(255, 10, 16 "p3");
597
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
598
select conv(255 AS p1, 10 AS p2, 16 AS p3);
600
# Native function with a variable number of arguments
602
# Bug in libm.so on Solaris:
603
# atan(10) from 32-bit version returns 1.4711276743037347
604
# atan(10) from 64-bit version returns 1.4711276743037345
605
--replace_result 1.4711276743037345 1.4711276743037347
607
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
608
select atan(10 AS p1);
609
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
611
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
612
select atan(10 AS "p1");
613
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
614
select atan(10 "p1");
617
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
618
select atan(10 AS p1, 20);
619
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
620
select atan(10 p1, 20);
621
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
622
select atan(10 AS "p1", 20);
623
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
624
select atan(10 "p1", 20);
625
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
626
select atan(10, 20 AS p2);
627
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
628
select atan(10, 20 p2);
629
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
630
select atan(10, 20 AS "p2");
631
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
632
select atan(10, 20 "p2");
633
-- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
634
select atan(10 AS p1, 20 AS p2);
637
# Bug#22312 Syntax error in expression with INTERVAL()
641
DROP TABLE IF EXISTS t1;
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
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
647
SELECT 1 + INTERVAL(1,0,1,2) + 1;
648
SELECT INTERVAL(1^1,0,1,2) + 1;
649
SELECT INTERVAL(1,0+1,2,3) * 5.5;
650
SELECT INTERVAL(3,3,1+3,4+4) / 0.5;
651
SELECT (INTERVAL(1,0,1,2) + 5) * 7 + INTERVAL(1,0,1,2) / 2;
652
SELECT INTERVAL(1,0,1,2) + 1, 5 * INTERVAL(1,0,1,2);
653
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
CREATE TABLE t1 (a INT, b DATETIME);
661
INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND);
662
SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1;
666
# Bug#28317 Left Outer Join with {oj outer-join}
670
DROP TABLE IF EXISTS t1,t2,t3;
672
CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME);
673
CREATE TABLE t2 LIKE t1;
674
CREATE TABLE t3 LIKE t1;
675
SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
676
SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
677
SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
678
SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
679
SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
680
SELECT {fn CONCAT(a1,a2)} FROM t1;
681
UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;
682
SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')};
683
DROP TABLE t1, t2, t3;
686
# Bug#31765 (BACKUP DATABASE broken syntax)
689
--error ER_PARSE_ERROR
690
BACKUP DATABASE *, test to 'broken.bak';
692
--error ER_PARSE_ERROR
693
BACKUP DATABASE *, db1, db2, db3 to 'broken.bak';