Commit 8b1751e5 authored by unknown's avatar unknown

BUG#12984 mysqltest.test: different output from "exec NonExistsinfComamdn"


mysql-test/r/mysqltest.result:
  Disable test for failing --exec and --system since output can't be piped to /dev/null on all platforms
mysql-test/t/mysqltest.test:
  Disable test for failing --exec and --system since output can't be piped to /dev/null on all platforms
  Avoid "echo -e" by using a temporary .sql file for tests that require more than one line.
parent 441d80a5
...@@ -179,7 +179,6 @@ source database ...@@ -179,7 +179,6 @@ source database
echo message echo message echo message echo message
mysqltest: At line 1: Empty variable mysqltest: At line 1: Empty variable
mysqltest: At line 1: command "';' 2> /dev/null" failed
mysqltest: At line 1: Missing argument in exec mysqltest: At line 1: Missing argument in exec
MySQL MySQL
"MySQL" "MySQL"
...@@ -301,7 +300,6 @@ mysqltest: At line 1: First argument to dec must be a variable (start with $) ...@@ -301,7 +300,6 @@ mysqltest: At line 1: First argument to dec must be a variable (start with $)
mysqltest: At line 1: End of line junk detected: "1000" mysqltest: At line 1: End of line junk detected: "1000"
mysqltest: At line 1: Missing arguments to system, nothing to do! mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: Missing arguments to system, nothing to do! mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: system command 'NonExistsinfComamdn 2> /dev/null' failed
test test
test2 test2
test3 test3
......
...@@ -358,8 +358,11 @@ select 3 from t1 ; ...@@ -358,8 +358,11 @@ select 3 from t1 ;
# Missing delimiter # Missing delimiter
# The comment will be "sucked into" the sleep command since # The comment will be "sucked into" the sleep command since
# delimiter is missing until after "show status" # delimiter is missing until after "show status"
--system echo "sleep 4" > var/log/mysqltest.sql
--system echo "# A comment" >> var/log/mysqltest.sql
--system echo "show status;" >> var/log/mysqltest.sql
--error 1 --error 1
--exec echo -e "sleep 4\n # A comment\nshow status;" | $MYSQL_TEST 2>&1 --exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1
# #
# Extra delimiter # Extra delimiter
...@@ -423,8 +426,9 @@ echo ; ...@@ -423,8 +426,9 @@ echo ;
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Illegal use of exec # Illegal use of exec
--error 1 # Disabled, some shells prints the failed command regardless of pipes
--exec echo "--exec ';' 2> /dev/null" | $MYSQL_TEST 2>&1 #--error 1
#--exec echo "--exec ';' 2> /dev/null" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "--exec " | $MYSQL_TEST 2>&1 --exec echo "--exec " | $MYSQL_TEST 2>&1
...@@ -671,8 +675,9 @@ system echo "hej" > /dev/null; ...@@ -671,8 +675,9 @@ system echo "hej" > /dev/null;
--exec echo "system;" | $MYSQL_TEST 2>&1 --exec echo "system;" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "system $NONEXISTSINFVAREABLI;" | $MYSQL_TEST 2>&1 --exec echo "system $NONEXISTSINFVAREABLI;" | $MYSQL_TEST 2>&1
--error 1 # Disabled, some shells prints the failed command regardless of pipes
--exec echo "system NonExistsinfComamdn 2> /dev/null;" | $MYSQL_TEST 2>&1 #--error 1
#--exec echo "system NonExistsinfComamdn 2> /dev/null;" | $MYSQL_TEST 2>&1
--disable_abort_on_error --disable_abort_on_error
system NonExistsinfComamdn; system NonExistsinfComamdn;
...@@ -722,12 +727,21 @@ while ($i) ...@@ -722,12 +727,21 @@ while ($i)
--exec echo "end;" | $MYSQL_TEST 2>&1 --exec echo "end;" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "{;" | $MYSQL_TEST 2>&1 --exec echo "{;" | $MYSQL_TEST 2>&1
--system echo "while (0)" > var/log/mysqltest.sql
--system echo "echo hej;" >> var/log/mysqltest.sql
--error 1 --error 1
--exec echo -e "while (0)\necho hej;" | $MYSQL_TEST 2>&1 --exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1
--system echo "while (0)" > var/log/mysqltest.sql
--system echo "{echo hej;" >> var/log/mysqltest.sql
--error 1 --error 1
--exec echo -e "while (0)\n{echo hej;" | $MYSQL_TEST 2>&1 --exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1
--system echo "while (0){" > var/log/mysqltest.sql
--system echo "echo hej;" >> var/log/mysqltest.sql
--error 1 --error 1
--exec echo -e "while (0){\n echo hej;" | $MYSQL_TEST 2>&1 --exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test error messages returned from comments starting with a command # Test error messages returned from comments starting with a command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment