1
select 0 as "before_use_test" ;
4
select otto from (select 1 as otto) as t1;
7
select otto from (select 1 as otto) as t1;
10
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed: 1054: Unknown column 'friedrich' in 'field list'
11
select friedrich from (select 1 as otto) as t1;
12
ERROR 42S22: Unknown column 'friedrich' in 'field list'
13
select otto from (select 1 as otto) as t1;
16
mysqltest: At line 1: query 'select otto from (select 1 as otto) as t1' succeeded - should have failed with sqlstate 42S22...
17
select friedrich from (select 1 as otto) as t1;
18
ERROR 42S22: Unknown column 'friedrich' in 'field list'
19
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22: 'Unknown column 'friedrich' in 'field list'', instead of 00000...
20
select otto from (select 1 as otto) as t1;
23
select 0 as "after_successful_stmt_errno" ;
24
after_successful_stmt_errno
27
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 'garbage' at line 1
28
select 1064 as "after_wrong_syntax_errno" ;
29
after_wrong_syntax_errno
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 'garbage' at line 1
33
select 1064 as "after_let_var_equal_value" ;
34
after_let_var_equal_value
37
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 'garbage' at line 1
39
select 0 as "after_set_var_equal_value" ;
40
after_set_var_equal_value
43
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 'garbage' at line 1
44
select 1064 as "after_disable_warnings_command" ;
45
after_disable_warnings_command
47
drop table if exists t1 ;
49
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 'garbage' at line 1
50
drop table if exists t1 ;
51
select 0 as "after_disable_warnings" ;
52
after_disable_warnings
55
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 'garbage' at line 1
57
ERROR 42S02: Table 'test.t1' doesn't exist
58
select 1146 as "after_minus_masked" ;
62
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 'garbage' at line 1
64
ERROR 42S02: Table 'test.t1' doesn't exist
65
select 1146 as "after_!_masked" ;
69
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 'garbage' at line 1
70
select -1 as "after_let_errno_equal_value" ;
71
after_let_errno_equal_value
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 'garbage' at line 1
75
prepare stmt from "select 3 from t1" ;
76
ERROR 42S02: Table 'test.t1' doesn't exist
77
select 1146 as "after_failing_prepare" ;
80
create table t1 ( f1 char(10));
82
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 'garbage' at line 1
83
prepare stmt from "select 3 from t1" ;
84
select 0 as "after_successful_prepare" ;
85
after_successful_prepare
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 'garbage' at line 1
91
select 0 as "after_successful_execute" ;
92
after_successful_execute
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 'garbage' at line 1
98
ERROR 42S02: Table 'test.t1' doesn't exist
99
select 1146 as "after_failing_execute" ;
100
after_failing_execute
103
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 'garbage' at line 1
105
ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE
106
select 1243 as "after_failing_execute" ;
107
after_failing_execute
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 'garbage' at line 1
111
deallocate prepare stmt;
112
select 0 as "after_successful_deallocate" ;
113
after_successful_deallocate
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 'garbage' at line 1
117
deallocate prepare __stmt_;
118
ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE
119
select 1243 as "after_failing_deallocate" ;
120
after_failing_deallocate
123
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 'garbage' at line 1
124
select 1064 as "after_--disable_abort_on_error" ;
125
after_--disable_abort_on_error
128
ERROR 42S02: Table 'test.t1' doesn't exist
130
ERROR 42S02: Table 'test.t1' doesn't exist
132
ERROR 42S02: Table 'test.t1' doesn't exist
133
select 1146 as "after_!errno_masked_error" ;
134
after_!errno_masked_error
136
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
138
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 'garbage' at line 1
139
select 1064 as "after_--enable_abort_on_error" ;
140
after_--enable_abort_on_error
143
ERROR 42S02: Table 'test.t1' doesn't exist
144
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
149
mysqltest: At line 1: End of line junk detected: "6"
150
mysqltest: At line 1: End of line junk detected: "6"
151
mysqltest: At line 1: Missing delimiter
152
mysqltest: At line 1: End of line junk detected: "sleep 7
155
mysqltest: At line 1: Missing delimiter
156
mysqltest: At line 1: Missing delimiter
157
mysqltest: At line 1: End of line junk detected: "disconnect default
166
mysqltest: At line 1: End of line junk detected: "disconnect default # comment
172
mysqltest: At line 1: Extra delimiter ";" found
173
mysqltest: At line 1: Extra delimiter ";" found
174
mysqltest: At line 1: Missing argument(s) to 'error'
175
mysqltest: At line 1: Missing argument(s) to 'error'
176
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
177
mysqltest: At line 1: The error name definition must start with an uppercase E
178
mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9]
179
mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9]
180
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
181
mysqltest: At line 1: The sqlstate may only consist of digits[0-9] and _uppercase_ letters
182
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
183
mysqltest: At line 1: Unknown SQL error name 'E9999'
184
mysqltest: At line 1: Invalid argument to error: '999e9' - the errno may only consist of digits[0-9]
185
mysqltest: At line 1: Invalid argument to error: '9b' - the errno may only consist of digits[0-9]
186
mysqltest: At line 1: Too many errorcodes specified
189
MySQL: The world''s most popular open source database
190
"MySQL: The world's most popular open source database"
194
# MySQL: The world''s
197
- MySQL: The world''s
200
- MySQL: The world''s
202
-- open source database
208
"MySQL: The world's most popular; open source database"
209
"MySQL: The world's most popular ; open source database"
210
"MySQL: The world's most popular ;open source database"
211
echo message echo message
213
mysqltest: At line 1: command "false" failed
214
mysqltest: At line 1: Missing argument in exec
228
-- open source database
247
a long variable content
248
a long variable content
249
a long a long variable content variable content
250
a long \$where variable content
253
Not a banana: ba\$cat\$cat
254
mysqltest: At line 1: Missing arguments to let
255
mysqltest: At line 1: Missing variable name in let
256
mysqltest: At line 1: Missing assignment operator in let
257
mysqltest: At line 1: Missing assignment operator in let
258
mysqltest: At line 1: Missing assignment operator in let
259
mysqltest: At line 1: Missing variable name in let
260
mysqltest: At line 1: Missing variable name in let
261
mysqltest: At line 1: Missing assignment operator in let
262
# Execute: --echo # <whatever> success: $success
263
# <whatever> success: 1
264
# Execute: echo # <whatever> success: $success ;
265
# <whatever> success: 1
266
# The next two variants work fine and expand the content of $success
267
# Execute: --echo $success
269
# Execute: echo $success ;
271
# Check if let $B = $A is an assignment per value.
272
let $A = initial value of A;
273
let $B = initial value of B;
275
# Content of $A is: initial value of B
276
let $A = changed value of A;
277
# Content of $B is: initial value of B
278
let $B = changed value of B;
279
# Content of $A is: changed value of A
280
var2: content of variable 1
281
var3: content of variable 1 content of variable 1
282
length of var3 is longer than 0
289
var3 two columns with same name
291
var4 from query that returns NULL
292
var5 from query that returns no row
294
mysqltest: At line 1: Error running query 'failing query': 1064 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 'failing query' at line 1
295
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
296
mysqltest: At line 1: Could not open './non_existingFile' for reading
297
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
298
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: 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 'garbage' at line 1
300
2 = outer loop variable after while
301
here is the sourced script
303
2 = outer loop variable before dec
305
1 = outer loop variable after dec
307
1 = outer loop variable after while
308
here is the sourced script
310
1 = outer loop variable before dec
312
0 = outer loop variable after dec
314
2 = outer loop variable after while
315
here is the sourced script
317
2 = outer loop variable before dec
319
1 = outer loop variable after dec
321
1 = outer loop variable after while
322
here is the sourced script
324
1 = outer loop variable before dec
326
0 = outer loop variable after dec
329
here is the sourced script
332
here is the sourced script
335
here is the sourced script
338
here is the sourced script
341
here is the sourced script
344
here is the sourced script
347
here is the sourced script
350
here is the sourced script
353
here is the sourced script
354
here is the sourced script
357
mysqltest: At line 1: Missing argument to sleep
358
mysqltest: At line 1: Missing argument to real_sleep
359
mysqltest: At line 1: Invalid argument to sleep "abc"
360
mysqltest: At line 1: Invalid argument to real_sleep "abc"
366
mysqltest: At line 1: Missing argument to inc
367
mysqltest: At line 1: The argument to inc must be a variable (start with $)
368
mysqltest: At line 1: End of line junk detected: "1000"
376
mysqltest: At line 1: Missing argument to dec
377
mysqltest: At line 1: The argument to dec must be a variable (start with $)
378
mysqltest: At line 1: End of line junk detected: "1000"
379
mysqltest: At line 1: Missing arguments to system, nothing to do!
380
mysqltest: At line 1: Missing arguments to system, nothing to do!
381
mysqltest: At line 1: system command 'false' failed
382
system command 'NonExistsinfComamdn 2> /dev/null' failed
387
Counter is greater than 0, (counter=10)
388
Counter is not 0, (counter=0)
390
Testing while with not
391
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
392
mysqltest: At line 1: missing '(' in while
393
mysqltest: At line 1: missing ')' in while
394
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
395
mysqltest: At line 1: Stray '}' - end of block before beginning
396
mysqltest: At line 1: Stray 'end' command - end of block before beginning
397
mysqltest: At line 1: query '{' failed: 1064: 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
398
mysqltest: At line 1: Missing '{' after while. Found "echo hej"
399
mysqltest: At line 3: Missing end of block
400
mysqltest: At line 3: Missing end of block
401
mysqltest: At line 1: missing '(' in if
402
mysqltest: At line 1: Stray 'end' command - end of block before beginning
403
select "b" bs col1, "c" bs col2;
406
seledt "b" bs dol1, "d" bs dol2;
409
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
410
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a;'
411
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
412
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a '
414
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c'
415
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c '
416
select "a" as col1, "c" as col2;
419
select "a" as col1, "c" as col2;
422
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a'
423
mysqltest: At line 1: Wrong number of arguments to replace_column in 'replace_column 1'
424
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a b'
425
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a 1'
426
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 b c '
427
mysqltest: At line 1: Invalid integer argument "10!"
428
mysqltest: At line 1: Invalid integer argument "a"
429
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
430
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
431
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
432
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
433
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
434
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
435
mysqltest: At line 1: Illegal option to connect: SMTP
437
mysqltest: The test didn't produce any output
438
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
439
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
440
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
442
ERROR 3D000: No database selected
443
Output from mysqltest-x.inc
444
Output from mysqltest-x.inc
445
Output from mysqltest-x.inc
446
mysqltest: Could not open './non_existing_file.inc' for reading: errno = 2
448
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 'failing_statement' at line 1
450
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 'failing_statement' at line 1
454
select 1 as `a'b`, 2 as `a"b`;
457
select 'aaa\\','aa''a',"aa""a";
467
"Here comes a very very long message that
468
- is longer then 80 characters and
469
- consists of several lines"
470
--------------------------------------------------------------------------------
472
. Here comes a very very long message that
473
. - is longer then 80 characters and
474
. - consists of several lines
475
--------------------------------------------------------------------------------
476
this will be executed
477
this will be executed
478
mysqltest: The test didn't produce any output
479
Failing multi statement query
480
mysqltest: At line 3: query 'create table t1 (a int primary key);
481
insert into t1 values (1);
483
insertz 'error query'' failed: 1064: 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 'insertz 'error query'' at line 1
485
mysqltest: At line 3: query 'create table t1 (a int primary key);
486
insert into t1 values (1);
488
insertz 'error query'' failed: 1064: 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 'insertz 'error query'' at line 1
490
More results from queries before failure can be found in MYSQLTEST_VARDIR/log/bug11731.log
492
Multi statement using expected error
493
create table t1 (a int primary key);
494
insert into t1 values (1);
496
insertz error query||||
499
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 'insertz error query' at line 1
503
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 'sleep' at line 1
505
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 'sleep' at line 1
507
ERROR 42000: Query was empty
508
select "b" as col1, "c" as col2;
511
select "b" as col1, "b" as col2, "c" as col3;
514
seled "b" bs col1, "d" bs col2;
517
select "raspberry and strawberry","blackberry","tomato";
518
raspberry and strawberry blackberry tomato
519
raspberry and strawberry blackberry tomato
520
mysqltest: At line 1: Error parsing replace_regex "a"
521
mysqltest: At line 1: Error parsing replace_regex "a;"
522
mysqltest: At line 1: Error parsing replace_regex "a"
523
mysqltest: At line 1: Error parsing replace_regex "a "
524
mysqltest: At line 1: Error parsing replace_regex "a b"
525
mysqltest: At line 1: Error parsing replace_regex "/a b c"
526
mysqltest: At line 1: Error parsing replace_regex "/a /b c "
527
create table t1 (a int, b int);
528
insert into t1 values (1,3);
529
insert into t1 values (2,4);
535
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
536
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
537
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
538
Content for test_file1
539
mysqltest: At line 1: File already exist: 'MYSQLTEST_VARDIR/tmp/test_file1.tmp'
543
mysqltest: At line 1: Failed to open file 'non_existing_file'
544
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
545
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
546
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
547
mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
548
mysqltest: At line 1: You must write a 4 digit octal number for mode
549
mysqltest: At line 1: You must write a 4 digit octal number for mode
550
mysqltest: At line 1: Missing required argument 'filename' to command 'chmod'
551
mysqltest: At line 1: You must write a 4 digit octal number for mode
552
mysqltest: At line 1: You must write a 4 digit octal number for mode
556
mysqltest: At line 1: Max delimiter length(16) exceeded
559
mysqltest: At line 1: test of die
561
create table t1( a int, b char(255), c timestamp);
562
insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 2", '2007-04-05');
563
insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 3", '2007-04-05');
566
1 Line 1 2007-04-05 00:00:00
567
2 Part 2 2007-04-05 00:00:00
568
1 Line 1 2007-04-05 00:00:00
569
2 Part 3 2007-04-05 00:00:00
572
1 Line 1 2007-04-05 00:00:00
573
1 Line 1 2007-04-05 00:00:00
574
2 Part 2 2007-04-05 00:00:00
575
2 Part 3 2007-04-05 00:00:00
578
1 Line 1 2007-04-05 00:00:00
579
2 Part 2 2007-04-05 00:00:00
580
1 Line 1 2007-04-05 00:00:00
581
2 Part 3 2007-04-05 00:00:00
605
SELECT 2 as "my_col" UNION SELECT 1;
621
CREATE TABLE t1( a CHAR);
625
SELECT NULL as "my_col1",2 AS "my_col2"
631
SELECT NULL as "my_col1",2 AS "my_col2"
637
SELECT 2 as "my_col1",NULL AS "my_col2"
643
SELECT 2 as "my_col1",NULL AS "my_col2"
662
SELECT '2' as "my_col1",2 as "my_col2"
664
SELECT '1',1 from t2;
665
ERROR 42S02: Table 'test.t2' doesn't exist
666
SELECT '1' as "my_col1",2 as "my_col2"
672
CREATE TABLE t1 (f1 INT);
673
INSERT INTO t1 SET f1 = 1024;
674
INSERT INTO t1 SELECT f1 - 1 FROM t1;
675
INSERT INTO t1 SELECT f1 - 2 FROM t1;
676
INSERT INTO t1 SELECT f1 - 4 FROM t1;
677
INSERT INTO t1 SELECT f1 - 8 FROM t1;
678
INSERT INTO t1 SELECT f1 - 16 FROM t1;
679
INSERT INTO t1 SELECT f1 - 32 FROM t1;
680
INSERT INTO t1 SELECT f1 - 64 FROM t1;
681
INSERT INTO t1 SELECT f1 - 128 FROM t1;
682
INSERT INTO t1 SELECT f1 - 256 FROM t1;
683
INSERT INTO t1 SELECT f1 - 512 FROM t1;
687
a int, b varchar(255), c datetime
689
SHOW COLUMNS FROM t1;
690
Field Type Null Key Default Extra
692
b varchar(255) YES NULL
694
statement=SHOW COLUMNS FROM t1 row_number=1, column_name="Type", Value=int(11)
695
statement="SHOW COLUMNS FROM t1" row_number=1, column_name="Type", Value=int(11)
696
statement=SHOW COLUMNS FROM t1 row_number=1, column_name=Default, Value=NULL
699
mysqltest: At line 1: query_get_value - argument list started with '(' must be ended with ')'
700
mysqltest: At line 1: Missing required argument 'query' to command 'query_get_value'
701
mysqltest: At line 1: Missing required argument 'column name' to command 'query_get_value'
702
mysqltest: At line 1: Missing required argument 'row number' to command 'query_get_value'
705
mysqltest: At line 1: Invalid row number: 'notnumber'
706
mysqltest: At line 1: Could not find column 'column_not_exists' in the result of 'SHOW COLUMNS FROM t1'
707
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
708
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
710
mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 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 'COLNS FROM t1' at line 1
712
Field Type Null Key Default Extra
713
a int(11) YES -><- NULL
714
b varchar(255) YES -><- NULL
715
c datetime YES -><- NULL
717
Number of columns with Default NULL: 3
719
SHOW COLUMNS FROM t1;
720
Field Type Null Key Default Extra
722
b varchar(255) YES NULL
725
mysqltest: At line 1: change user failed: Unknown database 'inexistent'
726
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
727
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)