Commit 9c5cd571 authored by Magnus Svensson's avatar Magnus Svensson

Merge

parents 960909fb 3bbeb698
...@@ -32,8 +32,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ...@@ -32,8 +32,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c) ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c)
TARGET_LINK_LIBRARIES(mysql mysqlclient_notls wsock32) TARGET_LINK_LIBRARIES(mysql mysqlclient_notls wsock32)
ADD_EXECUTABLE(mysqltest mysqltest.c) ADD_EXECUTABLE(mysqltest mysqltest.cc)
SET_SOURCE_FILES_PROPERTIES(mysqltest.c PROPERTIES COMPILE_FLAGS "-DTHREADS") SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys regex wsock32 dbug) TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys regex wsock32 dbug)
ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
......
...@@ -86,8 +86,8 @@ mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \ ...@@ -86,8 +86,8 @@ mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
$(LIBMYSQLCLIENT_LA) \ $(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a $(top_builddir)/mysys/libmysys.a
mysqltest_SOURCES= mysqltest.c mysqltest_SOURCES= mysqltest.cc
mysqltest_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK mysqltest_CXXFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \ mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \ @CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \ $(LIBMYSQLCLIENT_LA) \
......
This diff is collapsed.
...@@ -32,7 +32,7 @@ ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc ...@@ -32,7 +32,7 @@ ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32) TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
ADD_DEPENDENCIES(mysql_embedded libmysqld) ADD_DEPENDENCIES(mysql_embedded libmysqld)
ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c) ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc
TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32) TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
ADD_DEPENDENCIES(mysqltest_embedded libmysqld) ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
......
...@@ -41,7 +41,7 @@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) \ ...@@ -41,7 +41,7 @@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) \
@NDB_SCI_LIBS@ @NDB_SCI_LIBS@
mysqltest_embedded_LINK = $(CXXLINK) mysqltest_embedded_LINK = $(CXXLINK)
nodist_mysqltest_embedded_SOURCES = mysqltest.c nodist_mysqltest_embedded_SOURCES = mysqltest.cc
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a
nodist_mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \ nodist_mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
......
SHOW PROCESSLIST;
let $binlog_name= query_get_value("SHOW MASTER STATUS", File, 1);
eval SHOW BINLOG EVENTS IN '$binlog_name';
exit;
\ No newline at end of file
# Connect to both master and slave
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
vertical_results;
echo == MASTER ===========================================================;
connection master;
show master status;
show slave status;
echo == SLAVE ===========================================================;
connection slave;
show master status;
show slave status;
echo Output from mysqltest-x.inc; echo Output from mysqltest-x.inc;
exit;
...@@ -690,12 +690,16 @@ sub collect_one_test_case { ...@@ -690,12 +690,16 @@ sub collect_one_test_case {
name => "$suitename.$tname", name => "$suitename.$tname",
path => "$testdir/$filename", path => "$testdir/$filename",
# TODO allow nonexistsing result file
# in that case .test must issue "exit" otherwise test
# should fail by default
result_file => "$resdir/$tname.result",
); );
my $result_file= "$resdir/$tname.result";
if (-f $result_file) {
# Allow nonexistsing result file
# in that case .test must issue "exit" otherwise test
# should fail by default
$tinfo->{result_file}= $result_file;
}
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Skip some tests but include in list, just mark them as skipped # Skip some tests but include in list, just mark them as skipped
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
...@@ -103,17 +103,24 @@ sub mtr_report_test ($) { ...@@ -103,17 +103,24 @@ sub mtr_report_test ($) {
my ($tinfo)= @_; my ($tinfo)= @_;
_mtr_report_test_name($tinfo); _mtr_report_test_name($tinfo);
if ($tinfo->{'result'} eq 'MTR_RES_FAILED'){ my $comment= $tinfo->{'comment'};
my $logfile= $tinfo->{'logfile'};
my $warnings= $tinfo->{'warnings'};
my $result= $tinfo->{'result'};
if ( defined $tinfo->{'warnings'} ) if ($result eq 'MTR_RES_FAILED'){
if ( $warnings )
{ {
mtr_report("[ fail ] Found warnings in server log file!"); mtr_report("[ fail ] Found warnings in server log file!");
mtr_report($tinfo->{'warnings'}); mtr_report($warnings);
return; return;
} }
if ( defined $tinfo->{'timeout'} ) my $timeout= $tinfo->{'timeout'};
if ( $timeout )
{ {
mtr_report("[ fail ] timeout"); mtr_report("[ fail ] timeout after $timeout minutes");
mtr_report("\n$tinfo->{'comment'}");
return; return;
} }
else else
...@@ -121,43 +128,42 @@ sub mtr_report_test ($) { ...@@ -121,43 +128,42 @@ sub mtr_report_test ($) {
mtr_report("[ fail ]"); mtr_report("[ fail ]");
} }
if ( $tinfo->{'comment'} ) if ( $logfile )
{
# Test failure was detected by test tool and its report
# about what failed has been saved to file. Display the report.
mtr_report("\n$logfile\n");
}
if ( $comment )
{ {
# The test failure has been detected by mysql-test-run.pl # The test failure has been detected by mysql-test-run.pl
# when starting the servers or due to other error, the reason for # when starting the servers or due to other error, the reason for
# failing the test is saved in "comment" # failing the test is saved in "comment"
mtr_report("\nERROR: $tinfo->{'comment'}"); mtr_report("\n$comment\n");
} }
elsif ( $tinfo->{logfile} )
{
# Test failure was detected by test tool and its report
# about what failed has been saved to file. Display the report.
mtr_report("\n");
mtr_report($tinfo->{logfile}, "\n");
} if ( !$logfile and !$comment )
else
{ {
# Neither this script or the test tool has recorded info # Neither this script or the test tool has recorded info
# about why the test has failed. Should be debugged. # about why the test has failed. Should be debugged.
mtr_report("\nUnexpected termination, probably when starting mysqld");; mtr_report("\nUnknown result, neither 'comment' or 'logfile' set");
} }
} }
elsif ($tinfo->{'result'} eq 'MTR_RES_SKIPPED') elsif ($result eq 'MTR_RES_SKIPPED')
{ {
if ( $tinfo->{'disable'} ) if ( $tinfo->{'disable'} )
{ {
mtr_report("[ disabled ] $tinfo->{'comment'}"); mtr_report("[ disabled ] $comment");
} }
elsif ( $tinfo->{'comment'} ) elsif ( $comment )
{ {
if ( $tinfo->{skip_detected_by_test} ) if ( $tinfo->{skip_detected_by_test} )
{ {
mtr_report("[ skip ]. $tinfo->{'comment'}"); mtr_report("[ skip ]. $comment");
} }
else else
{ {
mtr_report("[ skip ] $tinfo->{'comment'}"); mtr_report("[ skip ] $comment");
} }
} }
else else
...@@ -165,7 +171,7 @@ sub mtr_report_test ($) { ...@@ -165,7 +171,7 @@ sub mtr_report_test ($) {
mtr_report("[ skip ]"); mtr_report("[ skip ]");
} }
} }
elsif ($tinfo->{'result'} eq 'MTR_RES_PASSED') elsif ($result eq 'MTR_RES_PASSED')
{ {
my $timer_str= $tinfo->{timer} || ""; my $timer_str= $tinfo->{timer} || "";
$tot_real_time += ($timer_str/1000); $tot_real_time += ($timer_str/1000);
......
...@@ -164,7 +164,7 @@ my $opt_repeat= 1; ...@@ -164,7 +164,7 @@ my $opt_repeat= 1;
my $opt_retry= 3; my $opt_retry= 3;
my $opt_retry_failure= 2; my $opt_retry_failure= 2;
my $opt_parallel; my $opt_parallel= $ENV{MTR_PARALLEL};
my $opt_strace_client; my $opt_strace_client;
...@@ -291,8 +291,9 @@ sub main { ...@@ -291,8 +291,9 @@ sub main {
my $tinfo = My::Test->new my $tinfo = My::Test->new
( (
name => 'report_features', name => 'report_features',
result_file => undef, # Prints result # No result_file => Prints result
path => 'include/report-features.test'. path => 'include/report-features.test'.
template_path => "include/default_my.cnf",
master_opt => [], master_opt => [],
slave_opt => [], slave_opt => [],
); );
...@@ -615,6 +616,7 @@ sub run_worker ($) { ...@@ -615,6 +616,7 @@ sub run_worker ($) {
} }
setup_vardir(); setup_vardir();
check_running_as_root();
mysql_install_db($thread_num); mysql_install_db($thread_num);
if ( using_extern() ) { if ( using_extern() ) {
...@@ -2332,7 +2334,6 @@ sub initialize_servers { ...@@ -2332,7 +2334,6 @@ sub initialize_servers {
mysql_install_db(0); mysql_install_db(0);
} }
} }
check_running_as_root();
} }
...@@ -2691,6 +2692,120 @@ sub check_testcase($$) ...@@ -2691,6 +2692,120 @@ sub check_testcase($$)
} }
# Start run mysqltest on one server
#
# RETURN VALUE
# 0 OK
# 1 Check failed
#
sub start_run_one ($$) {
my ($mysqld, $run)= @_;
my $name= "$run-".$mysqld->name();
my $args;
mtr_init_args(\$args);
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
mtr_add_arg($args, "--silent");
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--test-file=%s", "include/$run.test");
my $errfile= "$opt_vardir/tmp/$name.err";
my $proc= My::SafeProcess->new
(
name => $name,
path => $exe_mysqltest,
error => $errfile,
output => $errfile,
args => \$args,
user_data => $errfile,
);
mtr_verbose("Started $proc");
return $proc;
}
#
# Run script on all servers, collect results
#
# RETURN VALUE
# 0 ok
# 1 Failure
sub run_on_all($$)
{
my ($tinfo, $run)= @_;
my $tname= $tinfo->{name};
# Start the mysqltest processes in parallel to save time
# also makes it possible to wait for any process to exit during the check
# and to have a timeout process
my %started;
foreach my $mysqld ( mysqlds() )
{
if ( defined $mysqld->{'proc'} )
{
my $proc= start_run_one($mysqld, $run);
$started{$proc->pid()}= $proc;
}
}
# Return immediately if no check proceess was started
return 0 unless ( keys %started );
my $timeout_proc= My::SafeProcess->timer(60); # Seconds
while (1){
my $result;
my $proc= My::SafeProcess->wait_any();
mtr_report("Got $proc");
if ( delete $started{$proc->pid()} ) {
# One mysqltest process returned
my $err_file= $proc->user_data();
my $res= $proc->exit_status();
# Append the report from .err file
$tinfo->{comment}.= " == $err_file ==\n";
$tinfo->{comment}.= mtr_grab_file($err_file);
$tinfo->{comment}.= "\n";
# Remove the .err file
unlink($err_file);
if ( keys(%started) == 0){
# All completed
$timeout_proc->kill();
return 0;
}
# Wait for next process to exit
next;
}
elsif ( $proc eq $timeout_proc ) {
$tinfo->{comment}.= "Timeout $timeout_proc expired for running '$run'";
}
else {
# Unknown process returned, most likley a crash, abort everything
$tinfo->{comment}.=
"Unexpected process $proc returned during ".
"execution of '$run'";
}
# Kill any check processes still running
map($_->kill(), values(%started));
$timeout_proc->kill();
return 1;
}
}
sub mark_log { sub mark_log {
my ($log, $tinfo)= @_; my ($log, $tinfo)= @_;
my $log_msg= "CURRENT_TEST: $tinfo->{name}\n"; my $log_msg= "CURRENT_TEST: $tinfo->{name}\n";
...@@ -2728,6 +2843,26 @@ sub find_testcase_skipped_reason($) ...@@ -2728,6 +2843,26 @@ sub find_testcase_skipped_reason($)
} }
sub find_analyze_request
{
# Open the test log file
my $F= IO::File->new($path_current_testlog)
or return;
my $analyze;
while ( my $line= <$F> )
{
# Look for "reason: <reason for skipping test>"
if ( $line =~ /analyze: (.*)/ )
{
$analyze= $1;
}
}
return $analyze;
}
# Return timezone value of tinfo or default value # Return timezone value of tinfo or default value
sub timezone { sub timezone {
my ($tinfo)= @_; my ($tinfo)= @_;
...@@ -2931,6 +3066,13 @@ sub run_testcase ($) { ...@@ -2931,6 +3066,13 @@ sub run_testcase ($) {
} }
elsif ( $res == 1 ) elsif ( $res == 1 )
{ {
# Check if the test tool requests that
# an analyze script should be run
my $analyze= find_analyze_request();
if ($analyze){
run_on_all($tinfo, "analyze-$analyze");
}
# Test case failure reported by mysqltest # Test case failure reported by mysqltest
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
} }
...@@ -2989,8 +3131,10 @@ sub run_testcase ($) { ...@@ -2989,8 +3131,10 @@ sub run_testcase ($) {
# ---------------------------------------------------- # ----------------------------------------------------
if ( $proc eq $test_timeout_proc ) if ( $proc eq $test_timeout_proc )
{ {
mtr_report("Test case timeout!"); $tinfo->{comment}=
$tinfo->{'timeout'}= 1; # Mark as timeout "Test case timeout after $opt_testcase_timeout minute(s)\n\n";
$tinfo->{'timeout'}= $opt_testcase_timeout; # Mark as timeout
run_on_all($tinfo, 'analyze-timeout');
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
return 1; return 1;
} }
...@@ -3307,7 +3451,6 @@ sub report_failure_and_restart ($) { ...@@ -3307,7 +3451,6 @@ sub report_failure_and_restart ($) {
$tinfo->{'failures'}= $test_failures + 1; $tinfo->{'failures'}= $test_failures + 1;
my $logfile= $path_current_testlog;
if ( $tinfo->{comment} ) if ( $tinfo->{comment} )
{ {
# The test failure has been detected by mysql-test-run.pl # The test failure has been detected by mysql-test-run.pl
...@@ -3315,12 +3458,17 @@ sub report_failure_and_restart ($) { ...@@ -3315,12 +3458,17 @@ sub report_failure_and_restart ($) {
# failing the test is saved in "comment" # failing the test is saved in "comment"
; ;
} }
elsif ( defined $logfile and -f $logfile )
if ( !defined $tinfo->{logfile} )
{ {
# Test failure was detected by test tool and its report my $logfile= $path_current_testlog;
# about what failed has been saved to file. Save the report if ( defined $logfile and -f $logfile )
# in tinfo {
$tinfo->{logfile}= mtr_fromfile($logfile); # Test failure was detected by test tool and its report
# about what failed has been saved to file. Save the report
# in tinfo
$tinfo->{logfile}= mtr_fromfile($logfile);
}
} }
after_failure($tinfo); after_failure($tinfo);
...@@ -3898,6 +4046,16 @@ sub start_servers($) { ...@@ -3898,6 +4046,16 @@ sub start_servers($) {
$mysqld->{'proc'}) == 0) { $mysqld->{'proc'}) == 0) {
$tinfo->{comment}= $tinfo->{comment}=
"Failed to start ".$mysqld->name(); "Failed to start ".$mysqld->name();
my $logfile= $mysqld->value('log-error');
if ( defined $logfile and -f $logfile )
{
$tinfo->{logfile}= mtr_fromfile($logfile);
}
else
{
$tinfo->{logfile}= "Could not open server logfile: '$logfile'";
}
return 1; return 1;
} }
} }
...@@ -4018,8 +4176,6 @@ sub start_mysqltest ($) { ...@@ -4018,8 +4176,6 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--sleep=%d", $opt_sleep); mtr_add_arg($args, "--sleep=%d", $opt_sleep);
} }
client_debug_arg($args, "mysqltest");
if ( $opt_ssl ) if ( $opt_ssl )
{ {
# Turn on SSL for _all_ test cases if option --ssl was used # Turn on SSL for _all_ test cases if option --ssl was used
...@@ -4075,6 +4231,8 @@ sub start_mysqltest ($) { ...@@ -4075,6 +4231,8 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'}); mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'});
} }
client_debug_arg($args, "mysqltest");
if ( $opt_record ) if ( $opt_record )
{ {
mtr_add_arg($args, "--record"); mtr_add_arg($args, "--record");
......
...@@ -486,8 +486,6 @@ mysqltest: At line 3: query 'create table t1 (a int primary key); ...@@ -486,8 +486,6 @@ mysqltest: At line 3: query 'create table t1 (a int primary key);
insert into t1 values (1); insert into t1 values (1);
select 'select-me'; select 'select-me';
insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1 insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1
More results from queries before failure can be found in MYSQLTEST_VARDIR/log/bug11731.log
drop table t1; drop table t1;
Multi statement using expected error Multi statement using expected error
create table t1 (a int primary key); create table t1 (a int primary key);
...@@ -730,4 +728,12 @@ col ...@@ -730,4 +728,12 @@ col
z z
hej hej
mysqltest: At line 1: Found junk ' != 143' after $variable in expression mysqltest: At line 1: Found junk ' != 143' after $variable in expression
select 1;
1
1
select 1;
1
1
-- a comment for the server;
mysqltest: At line 1: Found line beginning with -- that didn't contain a valid mysqltest command, check your syntax or use # if you intended to write a comment
End of tests End of tests
...@@ -51,7 +51,8 @@ echo; ...@@ -51,7 +51,8 @@ echo;
-- disable_query_log -- disable_query_log
# Run the mysql_fix_privilege_tables.sql using "mysql --force" # Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/fix_priv_tables.log 2>&1 --exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log
-- enable_query_log -- enable_query_log
-- enable_result_log -- enable_result_log
......
...@@ -1225,7 +1225,7 @@ select "a" as col1, "c" as col2; ...@@ -1225,7 +1225,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; echo OK;" | $MYSQL_TEST 2>&1 --exec echo "replace_result a b; echo OK; exit;" | $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
...@@ -1289,7 +1289,7 @@ while ($i) ...@@ -1289,7 +1289,7 @@ while ($i)
dec $i; dec $i;
} }
EOF EOF
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1 --exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK; exit;" | $MYSQL_TEST 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
# Repeat connect/disconnect # Repeat connect/disconnect
...@@ -1496,6 +1496,7 @@ echo Multi statement using expected error; ...@@ -1496,6 +1496,7 @@ echo Multi statement using expected error;
--exec echo "select 'select-me';" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --exec echo "select 'select-me';" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "insertz "error query"||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --exec echo "insertz "error query"||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql --exec echo "delimiter ;||||" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "exit;" >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
# These two should work since the error is expected # These two should work since the error is expected
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1 --exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
...@@ -1688,6 +1689,7 @@ EOF ...@@ -1688,6 +1689,7 @@ EOF
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp
--error 1 --error 1
--diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
exit;
EOF EOF
# Execute the above diffs, and send their output to /dev/null - only # Execute the above diffs, and send their output to /dev/null - only
...@@ -2151,5 +2153,19 @@ EOF ...@@ -2151,5 +2153,19 @@ EOF
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
# ----------------------------------------------------------------------------
# Test that -- is not allowed as comment, only as mysqltest builtin command
# ----------------------------------------------------------------------------
# valid
select 1;
--query select 1
--query -- a comment for the server
# Not valid, "select" is not a mysqltest command
--error 1
--exec echo "--select 1;" | $MYSQL_TEST 2>&1
--echo End of tests --echo End of tests
...@@ -101,7 +101,7 @@ drop table t1; ...@@ -101,7 +101,7 @@ drop table t1;
# - Apparently selecting a cipher doesn't work at all # - Apparently selecting a cipher doesn't work at all
# - Usa a cipher that both yaSSL and OpenSSL supports # - Usa a cipher that both yaSSL and OpenSSL supports
# #
--exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql --exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
--exec $MYSQL_TEST --ssl-cipher=DHE-RSA-AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 --exec $MYSQL_TEST --ssl-cipher=DHE-RSA-AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
# #
...@@ -155,18 +155,18 @@ SET GLOBAL event_scheduler=0; ...@@ -155,18 +155,18 @@ SET GLOBAL event_scheduler=0;
# #
# Test to connect using a list of ciphers # Test to connect using a list of ciphers
# #
--exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql --exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 --exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
# Test to connect using a specifi cipher # Test to connect using a specifi cipher
# #
--exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql --exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 --exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
# Test to connect using an unknown cipher # Test to connect using an unknown cipher
# #
--exec echo "SHOW STATUS LIKE 'Ssl_cipher';" > $MYSQLTEST_VARDIR/tmp/test.sql --exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit" > $MYSQLTEST_VARDIR/tmp/test.sql
--error 1 --error 1
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 --exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 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