diff options
author | unknown <msvensson@neptunus.(none)> | 2006-02-23 10:11:57 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-02-23 10:11:57 +0100 |
commit | 44e286d215a8aab474c98c32a7c3896a581a0a10 (patch) | |
tree | 8c48598ebf7929c447f102ed5ed1805eca6d862b /mysql-test/t | |
parent | 06d4f8838ce239f0e273fd3080f578e33b53abac (diff) | |
download | mariadb-git-44e286d215a8aab474c98c32a7c3896a581a0a10.tar.gz |
Add new parameter to do_eval so that only unescaped variables in input string is expanded and rest of string is left untouched.
client/mysqltest.c:
Add new parameter to 'do_eval' that will add any escape chars found in the input string to the output string.
This is used in 'do_system' and in 'do_exec' where only unescaped variables
will be expanded, rest of the string will be left untouched.
mysql-test/r/mysqltest.result:
Update test result
mysql-test/t/mysqldump.test:
Revert previous patch that added extra \\ in "exec" command
mysql-test/t/mysqltest.test:
Revert previous patch that added extra \\ in exec command
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/mysqldump.test | 2 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index d5e48387203..0564ee9964c 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -647,7 +647,7 @@ select '------ Testing with illegal table names ------' as test_sequence ; --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1 --error 6 ---exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\\\t1" 2>&1 +--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1 --error 6 --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1 diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 50f8c02dbae..3726d6b8096 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -678,7 +678,7 @@ echo $i; --error 1 --exec echo "inc i;" | $MYSQL_TEST 2>&1 --error 1 ---exec echo "let \\\$i=100; inc \\\$i 1000; echo \\\$i;" | $MYSQL_TEST 2>&1 +--exec echo "let \$i=100; inc \$i 1000; echo \$i;" | $MYSQL_TEST 2>&1 inc $i; inc $i; inc $i; --echo $i echo $i; @@ -706,7 +706,7 @@ echo $d; --error 1 --exec echo "dec i;" | $MYSQL_TEST 2>&1 --error 1 ---exec echo "let \\\$i=100; dec \\\$i 1000; echo \\\$i;" | $MYSQL_TEST 2>&1 +--exec echo "let \$i=100; dec \$i 1000; echo \$i;" | $MYSQL_TEST 2>&1 # ---------------------------------------------------------------------------- @@ -761,11 +761,11 @@ while ($i) --error 1 --exec echo "source include/mysqltest_while.inc;" | $MYSQL_TEST 2>&1 --error 1 ---exec echo "while \\\$i;" | $MYSQL_TEST 2>&1 +--exec echo "while \$i;" | $MYSQL_TEST 2>&1 --error 1 ---exec echo "while (\\\$i;" | $MYSQL_TEST 2>&1 +--exec echo "while (\$i;" | $MYSQL_TEST 2>&1 --error 1 ---exec echo "let \\\$i=1; while (\\\$i) dec \\\$i;" | $MYSQL_TEST 2>&1 +--exec echo "let \$i=1; while (\$i) dec \$i;" | $MYSQL_TEST 2>&1 --error 1 --exec echo "};" | $MYSQL_TEST 2>&1 --error 1 @@ -877,22 +877,22 @@ select "a" as col1, "c" as col2; --exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect ---exec echo "let \\\$i=100;" > var/tmp/con.sql ---exec echo "while (\\\$i)" >> var/tmp/con.sql +--exec echo "let \$i=100;" > var/tmp/con.sql +--exec echo "while (\$i)" >> var/tmp/con.sql --exec echo "{" >> var/tmp/con.sql ---exec echo " connect (test_con1,localhost,root,,); " >> var/tmp/con.sql +--exec echo " connect (test_con1,localhost,root,,); " >> var/tmp/con.sql --exec echo " disconnect test_con1; " >> var/tmp/con.sql ---exec echo " dec \\\$i; " >> var/tmp/con.sql +--exec echo " dec \$i; " >> var/tmp/con.sql --exec echo "}" >> var/tmp/con.sql --exec echo "source var/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1 # Repeat connect/disconnect, exceed max number of connections ---exec echo "let \\\$i=200;" > var/tmp/con.sql ---exec echo "while (\\\$i)" >> var/tmp/con.sql +--exec echo "let \$i=200;" > var/tmp/con.sql +--exec echo "while (\$i)" >> var/tmp/con.sql --exec echo "{" >> var/tmp/con.sql --exec echo " connect (test_con1,localhost,root,,); " >> var/tmp/con.sql --exec echo " disconnect test_con1; " >> var/tmp/con.sql ---exec echo " dec \\\$i; " >> var/tmp/con.sql +--exec echo " dec \$i; " >> var/tmp/con.sql --exec echo "}" >> var/tmp/con.sql --error 1 --exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 @@ -1001,7 +1001,7 @@ select "this will be executed"; # # Test that a test file that does not generate any output fails. # ---exec echo "let \\\$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql +--exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql --error 1 --exec $MYSQL_TEST -x var/tmp/query.sql 2>&1 |