mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#2930
- Updated after review client/mysqltest.c: Remove the mysterious 1024, sed when calculating max_length for bind columns Change affected_rows variables to use ulonglong A little more fiddling with warnings in ps mode needed Add temporary workaround for bug#15518 Use ulong instead of "unsigned long" Print verbose_msg when failure to create view or sp Updated cheks for "zero size result file" and "no queries executed but result file found" The test must produce some output mysql-test/include/have_multi_ndb.inc: Use --require <result_file> instead of @r <result_file> mysql-test/r/mysqltest.result: Update resulfiles mysql-test/t/init_file.test: Add "echo" command so that test produces output. mysql-test/t/mysql_client_test.test: Add "echo" command so that test produces output. mysql-test/t/mysqltest.test: Added new test case for "zero size resul file" Added new test case for "no output" Make sure all generated sql files are put in var/tmp dir mysql-test/r/init_file.result: New BitKeeper file ``mysql-test/r/init_file.result'' mysql-test/r/mysql_client_test.result: New BitKeeper file ``mysql-test/r/mysql_client_test.result''
This commit is contained in:
@ -9,8 +9,8 @@ disable_query_log;
|
||||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
flush tables;
|
||||
@r/have_ndb.require show variables like "have_ndbcluster";
|
||||
# @r/server_id.require show variables like "server_id";
|
||||
--require r/have_ndb.require
|
||||
show variables like "have_ndbcluster";
|
||||
enable_query_log;
|
||||
|
||||
# Check that server2 has NDB support
|
||||
@ -20,8 +20,8 @@ disable_query_log;
|
||||
drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
flush tables;
|
||||
@r/have_ndb.require show variables like "have_ndbcluster";
|
||||
# @r/server_id1.require show variables like "server_id";
|
||||
--require r/have_ndb.require
|
||||
show variables like "have_ndbcluster";
|
||||
enable_query_log;
|
||||
|
||||
# Set the default connection to 'server1'
|
||||
|
1
mysql-test/r/init_file.result
Normal file
1
mysql-test/r/init_file.result
Normal file
@ -0,0 +1 @@
|
||||
ok
|
1
mysql-test/r/mysql_client_test.result
Normal file
1
mysql-test/r/mysql_client_test.result
Normal file
@ -0,0 +1 @@
|
||||
ok
|
@ -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 '
|
||||
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 '
|
||||
select "a" as col1, "c" as col2;
|
||||
@ -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: Illegal argument for port: 'illegal_port'
|
||||
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 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
|
||||
@ -394,3 +396,5 @@ root@localhost
|
||||
--------------------------------------------------------------------------------
|
||||
this will be executed
|
||||
this will be executed
|
||||
mysqltest: Result length mismatch
|
||||
mysqltest: The test didn't produce any output
|
||||
|
@ -7,3 +7,4 @@
|
||||
#
|
||||
|
||||
# End of 4.1 tests
|
||||
echo ok;
|
||||
|
@ -10,3 +10,5 @@
|
||||
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M
|
||||
|
||||
# End of 4.1 tests
|
||||
echo ok;
|
||||
|
||||
|
@ -368,10 +368,10 @@ select 3 from t1 ;
|
||||
# Missing delimiter until eof
|
||||
# The comment will be "sucked into" the sleep command since
|
||||
# delimiter is missing
|
||||
--system echo "sleep 7" > var/log/mysqltest.sql
|
||||
--system echo "# Another comment" >> var/log/mysqltest.sql
|
||||
--system echo "sleep 7" > var/tmp/mysqltest.sql
|
||||
--system echo "# Another comment" >> var/tmp/mysqltest.sql
|
||||
--error 1
|
||||
--exec $MYSQL_TEST < var/log/mysqltest.sql 2>&1
|
||||
--exec $MYSQL_TEST < var/tmp/mysqltest.sql 2>&1
|
||||
|
||||
#
|
||||
# Extra delimiter
|
||||
@ -737,20 +737,20 @@ while ($i)
|
||||
--error 1
|
||||
--exec echo "{;" | $MYSQL_TEST 2>&1
|
||||
|
||||
--system echo "while (0)" > var/log/mysqltest.sql
|
||||
--system echo "echo hej;" >> var/log/mysqltest.sql
|
||||
--system echo "while (0)" > var/tmp/mysqltest.sql
|
||||
--system echo "echo hej;" >> var/tmp/mysqltest.sql
|
||||
--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 "{echo hej;" >> var/log/mysqltest.sql
|
||||
--system echo "while (0)" > var/tmp/mysqltest.sql
|
||||
--system echo "{echo hej;" >> var/tmp/mysqltest.sql
|
||||
--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 "echo hej;" >> var/log/mysqltest.sql
|
||||
--system echo "while (0){" > var/tmp/mysqltest.sql
|
||||
--system echo "echo hej;" >> var/tmp/mysqltest.sql
|
||||
--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
|
||||
@ -778,7 +778,7 @@ select "a" as col1, "c" as col2;
|
||||
--exec echo "replace_result a;" | $MYSQL_TEST 2>&1
|
||||
--error 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
|
||||
--exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1
|
||||
--error 1
|
||||
@ -848,7 +848,7 @@ select "a" as col1, "c" as col2;
|
||||
--exec echo " disconnect test_con1; " >> 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;" | $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
|
||||
--exec echo "let \$i=200;" > var/tmp/con.sql
|
||||
@ -954,3 +954,29 @@ select "this will not be executed";
|
||||
--enable_parsing
|
||||
select "this will be executed";
|
||||
--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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user