374
374
# Another comment
377
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
378
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
381
# Missing delimiter until "disable_query_log"
383
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
392
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
393
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
396
# Missing delimiter until "disable_query_log"
398
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
408
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
377
--exec $DRIZZLE_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
378
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
381
# Missing delimiter until "disable_query_log"
383
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
392
--exec $DRIZZLE_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
393
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
396
# Missing delimiter until "disable_query_log"
398
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
408
--exec $DRIZZLE_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
409
409
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
460
460
# Missing argument
462
--exec echo "error;" | $MYSQL_TEST 2>&1
462
--exec echo "error;" | $DRIZZLE_TEST 2>&1
464
--exec echo "--error" | $MYSQL_TEST 2>&1
464
--exec echo "--error" | $DRIZZLE_TEST 2>&1
466
466
# First char must be uppercase 'S' or 'E' or [0-9]
468
--exec echo "--error s99999" | $MYSQL_TEST 2>&1
470
--exec echo "--error e99999" | $MYSQL_TEST 2>&1
472
--exec echo "--error 9eeeee" | $MYSQL_TEST 2>&1
474
--exec echo "--error 1sssss" | $MYSQL_TEST 2>&1
468
--exec echo "--error s99999" | $DRIZZLE_TEST 2>&1
470
--exec echo "--error e99999" | $DRIZZLE_TEST 2>&1
472
--exec echo "--error 9eeeee" | $DRIZZLE_TEST 2>&1
474
--exec echo "--error 1sssss" | $DRIZZLE_TEST 2>&1
476
476
# First char 'S' but too long
478
--exec echo "--error S999999" | $MYSQL_TEST 2>&1
478
--exec echo "--error S999999" | $DRIZZLE_TEST 2>&1
480
480
# First char 'S' but lowercase char found
482
--exec echo "--error S99a99" | $MYSQL_TEST 2>&1
482
--exec echo "--error S99a99" | $DRIZZLE_TEST 2>&1
484
484
# First char 'S' but too short
486
--exec echo "--error S9999" | $MYSQL_TEST 2>&1
486
--exec echo "--error S9999" | $DRIZZLE_TEST 2>&1
488
488
# First char 'E' but not found in error array
490
--exec echo "--error E9999" | $MYSQL_TEST 2>&1
490
--exec echo "--error E9999" | $DRIZZLE_TEST 2>&1
492
492
# First char [0-9] but contains chars
494
--exec echo "--error 999e9" | $MYSQL_TEST 2>&1
494
--exec echo "--error 999e9" | $DRIZZLE_TEST 2>&1
496
--exec echo "--error 9b" | $MYSQL_TEST 2>&1
496
--exec echo "--error 9b" | $DRIZZLE_TEST 2>&1
498
498
# Multiple errorcodes separated by ','
513
513
# Too many errorcodes specified
515
--exec echo "--error 1,2,3,4,5,6,7,8,9,10,11" | $MYSQL_TEST 2>&1
515
--exec echo "--error 1,2,3,4,5,6,7,8,9,10,11" | $DRIZZLE_TEST 2>&1
518
518
# ----------------------------------------------------------------------------
653
653
# Test illegal uses of let
656
--exec echo "let ;" | $MYSQL_TEST 2>&1
659
--exec echo "let \$=hi;" | $MYSQL_TEST 2>&1
662
--exec echo "let \$1 hi;" | $MYSQL_TEST 2>&1
665
--exec echo "let \$m hi;" | $MYSQL_TEST 2>&1
668
--exec echo "let \$hi;" | $MYSQL_TEST 2>&1
671
--exec echo "let \$ hi;" | $MYSQL_TEST 2>&1
674
--exec echo "let =hi;" | $MYSQL_TEST 2>&1
677
--exec echo "let hi;" | $MYSQL_TEST 2>&1
656
--exec echo "let ;" | $DRIZZLE_TEST 2>&1
659
--exec echo "let \$=hi;" | $DRIZZLE_TEST 2>&1
662
--exec echo "let \$1 hi;" | $DRIZZLE_TEST 2>&1
665
--exec echo "let \$m hi;" | $DRIZZLE_TEST 2>&1
668
--exec echo "let \$hi;" | $DRIZZLE_TEST 2>&1
671
--exec echo "let \$ hi;" | $DRIZZLE_TEST 2>&1
674
--exec echo "let =hi;" | $DRIZZLE_TEST 2>&1
677
--exec echo "let hi;" | $DRIZZLE_TEST 2>&1
679
679
# More advanced test for bug#17280
779
779
# Test illegal uses of source
782
--exec echo "source ;" | $MYSQL_TEST 2>&1
782
--exec echo "source ;" | $DRIZZLE_TEST 2>&1
785
785
--replace_result \\ /
786
786
# Source a nonexisting file
788
--exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1
788
--exec echo "source non_existingFile;" | $DRIZZLE_TEST 2>&1
790
790
# Too many source
791
791
--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" > $MYSQLTEST_VARDIR/tmp/recursive.sql
792
792
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
794
--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" | $MYSQL_TEST 2>&1
794
--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" | $DRIZZLE_TEST 2>&1
795
795
remove_file $MYSQLTEST_VARDIR/tmp/recursive.sql;
797
797
# Source a file with error
798
798
--exec echo "garbage ;" > $MYSQLTEST_VARDIR/tmp/error.sql
799
799
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
801
--exec echo "source $MYSQLTEST_VARDIR/tmp/error.sql;" | $MYSQL_TEST 2>&1
801
--exec echo "source $MYSQLTEST_VARDIR/tmp/error.sql;" | $DRIZZLE_TEST 2>&1
803
803
remove_file $MYSQLTEST_VARDIR/tmp/error.sql;
875
875
# Missing parameter
877
--exec echo "sleep ;" | $MYSQL_TEST 2>&1
877
--exec echo "sleep ;" | $DRIZZLE_TEST 2>&1
879
--exec echo "real_sleep ;" | $MYSQL_TEST 2>&1
879
--exec echo "real_sleep ;" | $DRIZZLE_TEST 2>&1
881
881
# Illegal parameter
883
--exec echo "sleep abc;" | $MYSQL_TEST 2>&1
883
--exec echo "sleep abc;" | $DRIZZLE_TEST 2>&1
885
--exec echo "real_sleep abc;" | $MYSQL_TEST 2>&1
885
--exec echo "real_sleep abc;" | $DRIZZLE_TEST 2>&1
887
887
# ----------------------------------------------------------------------------
932
--exec echo "dec;" | $MYSQL_TEST 2>&1
934
--exec echo "dec i;" | $MYSQL_TEST 2>&1
936
--exec echo "let \$i=100; dec \$i 1000; echo \$i;" | $MYSQL_TEST 2>&1
932
--exec echo "dec;" | $DRIZZLE_TEST 2>&1
934
--exec echo "dec i;" | $DRIZZLE_TEST 2>&1
936
--exec echo "let \$i=100; dec \$i 1000; echo \$i;" | $DRIZZLE_TEST 2>&1
939
939
# ----------------------------------------------------------------------------
945
945
--system echo "hej" > /dev/null;
948
--exec echo "system;" | $MYSQL_TEST 2>&1
950
--exec echo "system $NONEXISTSINFVAREABLI;" | $MYSQL_TEST 2>&1
952
--exec echo "system false;" | $MYSQL_TEST 2>&1
948
--exec echo "system;" | $DRIZZLE_TEST 2>&1
950
--exec echo "system $NONEXISTSINFVAREABLI;" | $DRIZZLE_TEST 2>&1
952
--exec echo "system false;" | $DRIZZLE_TEST 2>&1
954
954
--disable_abort_on_error
955
955
system NonExistsinfComamdn 2> /dev/null;
1157
1157
--replace_result \\ / $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
1159
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc;" | $MYSQL_TEST 2>&1
1159
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc;" | $DRIZZLE_TEST 2>&1
1160
1160
--remove_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
1162
--exec echo "while \$i;" | $MYSQL_TEST 2>&1
1164
--exec echo "while (\$i;" | $MYSQL_TEST 2>&1
1166
--exec echo "let \$i=1; while (\$i) dec \$i;" | $MYSQL_TEST 2>&1
1168
--exec echo "};" | $MYSQL_TEST 2>&1
1170
--exec echo "end;" | $MYSQL_TEST 2>&1
1172
--exec echo "{;" | $MYSQL_TEST 2>&1
1162
--exec echo "while \$i;" | $DRIZZLE_TEST 2>&1
1164
--exec echo "while (\$i;" | $DRIZZLE_TEST 2>&1
1166
--exec echo "let \$i=1; while (\$i) dec \$i;" | $DRIZZLE_TEST 2>&1
1168
--exec echo "};" | $DRIZZLE_TEST 2>&1
1170
--exec echo "end;" | $DRIZZLE_TEST 2>&1
1172
--exec echo "{;" | $DRIZZLE_TEST 2>&1
1174
1174
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
1179
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
1179
--exec $DRIZZLE_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
1180
1180
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
1182
1182
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
1200
1200
# Test error messages returned from comments starting with a command
1201
1201
# ----------------------------------------------------------------------------
1203
--exec echo "--if the other server is down" | $MYSQL_TEST 2>&1
1203
--exec echo "--if the other server is down" | $DRIZZLE_TEST 2>&1
1206
--exec echo "-- end when ..." | $MYSQL_TEST 2>&1
1206
--exec echo "-- end when ..." | $DRIZZLE_TEST 2>&1
1208
1208
# ----------------------------------------------------------------------------
1215
1215
select "a" as col1, "c" as col2;
1218
--exec echo "--replace_result a" | $MYSQL_TEST 2>&1
1220
--exec echo "--replace_result a;" | $MYSQL_TEST 2>&1
1222
--exec echo "replace_result a;" | $MYSQL_TEST 2>&1
1224
--exec echo "replace_result a ;" | $MYSQL_TEST 2>&1
1225
--exec echo "replace_result a b; echo OK;" | $MYSQL_TEST 2>&1
1227
--exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1
1229
--exec echo "replace_result a b c ;" | $MYSQL_TEST 2>&1
1218
--exec echo "--replace_result a" | $DRIZZLE_TEST 2>&1
1220
--exec echo "--replace_result a;" | $DRIZZLE_TEST 2>&1
1222
--exec echo "replace_result a;" | $DRIZZLE_TEST 2>&1
1224
--exec echo "replace_result a ;" | $DRIZZLE_TEST 2>&1
1225
--exec echo "replace_result a b; echo OK;" | $DRIZZLE_TEST 2>&1
1227
--exec echo "--replace_result a b c" | $DRIZZLE_TEST 2>&1
1229
--exec echo "replace_result a b c ;" | $DRIZZLE_TEST 2>&1
1232
1232
--replace_column 1 b
1236
1236
select "a" as col1, "c" as col2;
1239
--exec echo "--replace_column a" | $MYSQL_TEST 2>&1
1242
--exec echo "--replace_column 1" | $MYSQL_TEST 2>&1
1245
--exec echo "--replace_column a b" | $MYSQL_TEST 2>&1
1247
--exec echo "--replace_column a 1" | $MYSQL_TEST 2>&1
1249
--exec echo "--replace_column 1 b c " | $MYSQL_TEST 2>&1
1239
--exec echo "--replace_column a" | $DRIZZLE_TEST 2>&1
1242
--exec echo "--replace_column 1" | $DRIZZLE_TEST 2>&1
1245
--exec echo "--replace_column a b" | $DRIZZLE_TEST 2>&1
1247
--exec echo "--replace_column a 1" | $DRIZZLE_TEST 2>&1
1249
--exec echo "--replace_column 1 b c " | $DRIZZLE_TEST 2>&1
1252
1252
# ----------------------------------------------------------------------------
1253
1253
# Test sync_with_master
1254
1254
# ----------------------------------------------------------------------------
1256
--exec echo "sync_with_master 10!;" | $MYSQL_TEST 2>&1
1256
--exec echo "sync_with_master 10!;" | $DRIZZLE_TEST 2>&1
1258
--exec echo "sync_with_master a;" | $MYSQL_TEST 2>&1
1258
--exec echo "sync_with_master a;" | $DRIZZLE_TEST 2>&1
1260
1260
# ----------------------------------------------------------------------------
1262
1262
# ----------------------------------------------------------------------------
1265
--exec echo "connect;" | $MYSQL_TEST 2>&1
1267
--exec echo "connect ();" | $MYSQL_TEST 2>&1
1269
--exec echo "connect (con2);" | $MYSQL_TEST 2>&1
1271
--exec echo "connect (con2,);" | $MYSQL_TEST 2>&1
1273
--exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1
1275
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1
1277
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1
1265
--exec echo "connect;" | $DRIZZLE_TEST 2>&1
1267
--exec echo "connect ();" | $DRIZZLE_TEST 2>&1
1269
--exec echo "connect (con2);" | $DRIZZLE_TEST 2>&1
1271
--exec echo "connect (con2,);" | $DRIZZLE_TEST 2>&1
1273
--exec echo "connect (con2,localhost,root,,illegal_db);" | $DRIZZLE_TEST 2>&1
1275
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $DRIZZLE_TEST 2>&1
1277
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $DRIZZLE_TEST 2>&1
1279
1279
# Repeat connect/disconnect
1280
1280
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
1347
1347
# ----------------------------------------------------------------------------
1349
1349
# -x <file_name>, use the file specified after -x as the test file
1350
--exec $MYSQL_TEST < $MYSQL_TEST_DIR/include/mysqltest-x.inc
1351
--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/include/mysqltest-x.inc
1352
--exec $MYSQL_TEST --test_file=$MYSQL_TEST_DIR/include/mysqltest-x.inc
1350
--exec $DRIZZLE_TEST < $DRIZZLE_TEST_DIR/include/mysqltest-x.inc
1351
--exec $DRIZZLE_TEST -x $DRIZZLE_TEST_DIR/include/mysqltest-x.inc
1352
--exec $DRIZZLE_TEST --test_file=$DRIZZLE_TEST_DIR/include/mysqltest-x.inc
1353
1353
# Fix Win paths
1354
1354
--replace_result \\ /
1356
--exec $MYSQL_TEST -x non_existing_file.inc 2>&1
1356
--exec $DRIZZLE_TEST -x non_existing_file.inc 2>&1
1359
1359
# ----------------------------------------------------------------------------
1429
1429
--exec touch $MYSQLTEST_VARDIR/tmp/zero_length_file.result
1430
1430
--exec echo "echo ok;" > $MYSQLTEST_VARDIR/tmp/query.sql
1432
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result > /dev/null 2>&1
1432
--exec $DRIZZLE_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result > /dev/null 2>&1
1434
1434
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
1436
1436
remove_file $MYSQLTEST_VARDIR/log/zero_length_file.reject;
1438
remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;
1438
remove_file $DRIZZLE_TEST_DIR/r/zero_length_file.reject;
1441
1441
# Test that a test file that does not generate any output fails.
1443
1443
--exec echo "let \$i= 1;" > $MYSQLTEST_VARDIR/tmp/query.sql
1445
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql 2>&1
1445
--exec $DRIZZLE_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql 2>&1
1447
1447
remove_file $MYSQLTEST_VARDIR/tmp/query.sql;
1472
1472
--exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
1475
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
1475
--exec $DRIZZLE_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
1478
1478
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
1480
--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
1480
--exec $DRIZZLE_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
1481
1481
# The .out file should be non existent
1482
1482
--exec test ! -s $MYSQLTEST_VARDIR/tmp/bug11731.out
1495
1495
--exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
1497
1497
# These two should work since the error is expected
1498
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
1498
--exec $DRIZZLE_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
1501
--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
1501
--exec $DRIZZLE_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
1502
1502
# The .out file should exist
1503
1503
--exec test -s $MYSQLTEST_VARDIR/tmp/bug11731.out
1536
1536
select "strawberry","blueberry","potato";
1539
--exec echo "--replace_regex a" | $MYSQL_TEST 2>&1
1541
--exec echo "--replace_regex a;" | $MYSQL_TEST 2>&1
1543
--exec echo "replace_regex a;" | $MYSQL_TEST 2>&1
1545
--exec echo "replace_regex a ;" | $MYSQL_TEST 2>&1
1547
--exec echo "replace_regex a b; echo OK;" | $MYSQL_TEST 2>&1
1549
--exec echo "--replace_regex /a b c" | $MYSQL_TEST 2>&1
1551
--exec echo "replace_regex /a /b c ;" | $MYSQL_TEST 2>&1
1539
--exec echo "--replace_regex a" | $DRIZZLE_TEST 2>&1
1541
--exec echo "--replace_regex a;" | $DRIZZLE_TEST 2>&1
1543
--exec echo "replace_regex a;" | $DRIZZLE_TEST 2>&1
1545
--exec echo "replace_regex a ;" | $DRIZZLE_TEST 2>&1
1547
--exec echo "replace_regex a b; echo OK;" | $DRIZZLE_TEST 2>&1
1549
--exec echo "--replace_regex /a b c" | $DRIZZLE_TEST 2>&1
1551
--exec echo "replace_regex /a /b c ;" | $DRIZZLE_TEST 2>&1
1554
1554
# replace_regex should replace substitutions from left to right in output
1574
1574
# test for write_file
1575
1575
# ----------------------------------------------------------------------------
1577
--exec echo "write_file ;" | $MYSQL_TEST 2>&1
1577
--exec echo "write_file ;" | $DRIZZLE_TEST 2>&1
1580
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
1580
--exec echo "write_file filename ;" | $DRIZZLE_TEST 2>&1
1582
1582
# Comment out this test as it confuses cmd.exe with unmatched "
1584
#--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
1584
#--exec echo "write_file filename \";" | $DRIZZLE_TEST 2>&1
1586
1586
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
1587
1587
Content for test_file1
1762
1762
remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
1765
--exec echo "chmod ;" | $MYSQL_TEST 2>&1
1768
--exec echo "chmod 0 from_file;" | $MYSQL_TEST 2>&1
1771
--exec echo "chmod 08 from_file;" | $MYSQL_TEST 2>&1
1774
--exec echo "chmod from_file;" | $MYSQL_TEST 2>&1
1777
--exec echo "chmod ABZD from_file;" | $MYSQL_TEST 2>&1
1780
--exec echo "chmod 06789 from_file;" | $MYSQL_TEST 2>&1
1765
--exec echo "chmod ;" | $DRIZZLE_TEST 2>&1
1768
--exec echo "chmod 0 from_file;" | $DRIZZLE_TEST 2>&1
1771
--exec echo "chmod 08 from_file;" | $DRIZZLE_TEST 2>&1
1774
--exec echo "chmod from_file;" | $DRIZZLE_TEST 2>&1
1777
--exec echo "chmod ABZD from_file;" | $DRIZZLE_TEST 2>&1
1780
--exec echo "chmod 06789 from_file;" | $DRIZZLE_TEST 2>&1
1783
1783
# ----------------------------------------------------------------------------
1812
1812
# ----------------------------------------------------------------------------
1815
--exec echo "die test of die;" | $MYSQL_TEST 2>&1
1815
--exec echo "die test of die;" | $DRIZZLE_TEST 2>&1
1818
1818
# ----------------------------------------------------------------------------
1819
1819
# test for exit
1820
1820
# ----------------------------------------------------------------------------
1822
--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1
1822
--exec echo "echo Some output; exit; echo Not this;" | $DRIZZLE_TEST 2>&1
1824
1824
# ----------------------------------------------------------------------------
1825
1825
# test for sorted_result
1999
1999
# 5. Incomplete statement including missing parameters
2000
2000
# 5.1 incomplete statement
2002
--exec echo "let \$value= query_get_value(SHOW;" | $MYSQL_TEST 2>&1
2002
--exec echo "let \$value= query_get_value(SHOW;" | $DRIZZLE_TEST 2>&1
2003
2003
# 5.2 missing query
2005
--exec echo "let \$value= query_get_value;" | $MYSQL_TEST 2>&1
2005
--exec echo "let \$value= query_get_value;" | $DRIZZLE_TEST 2>&1
2006
2006
# 5.3 missing column name
2008
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1);" | $MYSQL_TEST 2>&1
2008
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1);" | $DRIZZLE_TEST 2>&1
2009
2009
# 5.4 missing row number
2011
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field);" | $MYSQL_TEST 2>&1
2011
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field);" | $DRIZZLE_TEST 2>&1
2013
2013
# 6. Somehow "wrong" value of parameters
2014
2014
# 6.1 row parameter
2022
2022
--echo value= $value
2023
2023
# 6.1.3 invalid row number
2025
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field, notnumber);" | $MYSQL_TEST 2>&1
2025
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field, notnumber);" | $DRIZZLE_TEST 2>&1
2026
2026
# 6.2 column name parameter, name of not existing column
2028
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, column_not_exists, 1);" | $MYSQL_TEST 2>&1
2028
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, column_not_exists, 1);" | $DRIZZLE_TEST 2>&1
2029
2029
# 6.3. statement which never gives a result set
2031
--exec echo "let \$value= query_get_value(SET @A = 1, Field, 1);" | $MYSQL_TEST 2>&1
2031
--exec echo "let \$value= query_get_value(SET @A = 1, Field, 1);" | $DRIZZLE_TEST 2>&1
2032
2032
# 6.4. statement contains a ","
2033
2033
# Note: There is no need to improve this, because we need query_get_value
2034
2034
# for SHOW commands only.
2036
--exec echo "let \$value= query_get_value(SELECT 1 AS "A", 1 AS "B", 1);" | $MYSQL_TEST 2>&1
2036
--exec echo "let \$value= query_get_value(SELECT 1 AS "A", 1 AS "B", 1);" | $DRIZZLE_TEST 2>&1
2038
2038
# 7. empty result set
2039
2039
let $value= initialized;
2085
2085
# ----------------------------------------------------------------------------
2088
--exec echo "--change_user root,,inexistent" | $MYSQL_TEST 2>&1
2091
--exec echo "--change_user inexistent,,test" | $MYSQL_TEST 2>&1
2094
--exec echo "--change_user root,inexistent,test" | $MYSQL_TEST 2>&1
2088
--exec echo "--change_user root,,inexistent" | $DRIZZLE_TEST 2>&1
2091
--exec echo "--change_user inexistent,,test" | $DRIZZLE_TEST 2>&1
2094
--exec echo "--change_user root,inexistent,test" | $DRIZZLE_TEST 2>&1
2097
2097
--change_user root