WL#2930

- Updated after review
parent a6031b64
This diff is collapsed.
...@@ -9,8 +9,8 @@ disable_query_log; ...@@ -9,8 +9,8 @@ disable_query_log;
drop table if exists t1, t2; drop table if exists t1, t2;
--enable_warnings --enable_warnings
flush tables; flush tables;
@r/have_ndb.require show variables like "have_ndbcluster"; --require r/have_ndb.require
# @r/server_id.require show variables like "server_id"; show variables like "have_ndbcluster";
enable_query_log; enable_query_log;
# Check that server2 has NDB support # Check that server2 has NDB support
...@@ -20,8 +20,8 @@ disable_query_log; ...@@ -20,8 +20,8 @@ disable_query_log;
drop table if exists t1, t2; drop table if exists t1, t2;
--enable_warnings --enable_warnings
flush tables; flush tables;
@r/have_ndb.require show variables like "have_ndbcluster"; --require r/have_ndb.require
# @r/server_id1.require show variables like "server_id"; show variables like "have_ndbcluster";
enable_query_log; enable_query_log;
# Set the default connection to 'server1' # Set the default connection to 'server1'
......
...@@ -331,6 +331,7 @@ mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_re ...@@ -331,6 +331,7 @@ mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_re
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a;' mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a;'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a' mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a ' mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a '
OK
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c' mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c ' mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c '
select "a" as col1, "c" as col2; select "a" as col1, "c" as col2;
...@@ -356,6 +357,7 @@ mysqltest: At line 1: Missing connection db ...@@ -356,6 +357,7 @@ mysqltest: At line 1: Missing connection db
mysqltest: At line 1: Could not open connection 'con2': Unknown database 'illegal_db' mysqltest: At line 1: Could not open connection 'con2': Unknown database 'illegal_db'
mysqltest: At line 1: Illegal argument for port: 'illegal_port' mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP mysqltest: At line 1: Illegal option to connect: SMTP
OK
mysqltest: In included file "./var/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c mysqltest: In included file "./var/tmp/con.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c
mysqltest: In included file "./var/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool mysqltest: In included file "./var/tmp/con.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "./var/tmp/con.sql": At line 2: Connection test_con1 already exists mysqltest: In included file "./var/tmp/con.sql": At line 2: Connection test_con1 already exists
...@@ -394,3 +396,5 @@ root@localhost ...@@ -394,3 +396,5 @@ root@localhost
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
this will be executed this will be executed
this will be executed this will be executed
mysqltest: Result length mismatch
mysqltest: The test didn't produce any output
...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
# #
# End of 4.1 tests # End of 4.1 tests
echo ok;
...@@ -10,3 +10,5 @@ ...@@ -10,3 +10,5 @@
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M --exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M
# End of 4.1 tests # End of 4.1 tests
echo ok;
...@@ -368,10 +368,10 @@ select 3 from t1 ; ...@@ -368,10 +368,10 @@ select 3 from t1 ;
# Missing delimiter until eof # Missing delimiter until eof
# The comment will be "sucked into" the sleep command since # The comment will be "sucked into" the sleep command since
# delimiter is missing # delimiter is missing
--system echo "sleep 7" > var/log/mysqltest.sql --system echo "sleep 7" > var/tmp/mysqltest.sql
--system echo "# Another comment" >> var/log/mysqltest.sql --system echo "# Another comment" >> var/tmp/mysqltest.sql
--error 1 --error 1
--exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 --exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1
# #
# Extra delimiter # Extra delimiter
...@@ -737,20 +737,20 @@ while ($i) ...@@ -737,20 +737,20 @@ while ($i)
--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 "while (0)" > var/tmp/mysqltest.sql
--system echo "echo hej;" >> var/log/mysqltest.sql --system echo "echo hej;" >> var/tmp/mysqltest.sql
--error 1 --error 1
--exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 --exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1
--system echo "while (0)" > var/log/mysqltest.sql --system echo "while (0)" > var/tmp/mysqltest.sql
--system echo "{echo hej;" >> var/log/mysqltest.sql --system echo "{echo hej;" >> var/tmp/mysqltest.sql
--error 1 --error 1
--exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 --exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1
--system echo "while (0){" > var/log/mysqltest.sql --system echo "while (0){" > var/tmp/mysqltest.sql
--system echo "echo hej;" >> var/log/mysqltest.sql --system echo "echo hej;" >> var/tmp/mysqltest.sql
--error 1 --error 1
--exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1 --exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test error messages returned from comments starting with a command # Test error messages returned from comments starting with a command
...@@ -778,7 +778,7 @@ select "a" as col1, "c" as col2; ...@@ -778,7 +778,7 @@ select "a" as col1, "c" as col2;
--exec echo "replace_result a;" | $MYSQL_TEST 2>&1 --exec echo "replace_result a;" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "replace_result a ;" | $MYSQL_TEST 2>&1 --exec echo "replace_result a ;" | $MYSQL_TEST 2>&1
--exec echo "replace_result a b;" | $MYSQL_TEST 2>&1 --exec echo "replace_result a b; echo OK;" | $MYSQL_TEST 2>&1
--error 1 --error 1
--exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1 --exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1
--error 1 --error 1
...@@ -848,7 +848,7 @@ select "a" as col1, "c" as col2; ...@@ -848,7 +848,7 @@ select "a" as col1, "c" as col2;
--exec echo " disconnect test_con1; " >> 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 "}" >> var/tmp/con.sql
--exec echo "source var/tmp/con.sql;" | $MYSQL_TEST 2>&1 --exec echo "source var/tmp/con.sql; echo OK;" | $MYSQL_TEST 2>&1
# Repeat connect/disconnect, exceed max number of connections # Repeat connect/disconnect, exceed max number of connections
--exec echo "let \$i=200;" > var/tmp/con.sql --exec echo "let \$i=200;" > var/tmp/con.sql
...@@ -954,3 +954,29 @@ select "this will not be executed"; ...@@ -954,3 +954,29 @@ select "this will not be executed";
--enable_parsing --enable_parsing
select "this will be executed"; select "this will be executed";
--enable_query_log --enable_query_log
#
# Test zero length result file. Should not pass
#
--exec touch $MYSQL_TEST_DIR/var/tmp/zero_length_file.result
--exec echo "echo ok;" > $MYSQL_TEST_DIR/var/tmp/query.sql
--error 1
--exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/zero_length_file.result 2>&1
#
# Test that a test file that does not generate any output fails.
#
--exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql
--error 1
--exec $MYSQL_TEST -x var/tmp/query.sql 2>&1
#
# Test that mysqltest fails when there are no queries executed
# but a result file exist
# NOTE! This will never happen as long as it's not allowed to have
# test files that does not produce any output
#--exec echo "something" > $MYSQL_TEST_DIR/var/tmp/result_file.result
#--exec echo "let \$i= 1;" > $MYSQL_TEST_DIR/var/tmp/query.sql
#--error 1
#--exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/result_file.result 2>&1
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