1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge from 5.1 main.

This commit is contained in:
Davi Arnaut
2009-06-08 09:55:37 -03:00
8 changed files with 137 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
perl mysql-test-run.pl --timer --force --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --comment=embedded --embedded --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --embedded --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental

View File

@@ -71,6 +71,8 @@ sub _mtr_report_test_name ($) {
print _name(), _timestamp();
printf "%-40s ", $tname;
my $worker = $tinfo->{worker};
printf "w$worker " if $worker;
return $tname;
}
@@ -219,8 +221,8 @@ sub mtr_report_test ($) {
}
sub mtr_report_stats ($) {
my $tests= shift;
sub mtr_report_stats ($;$) {
my ($tests, $dont_error)= @_;
# ----------------------------------------------------------------------
# Find out how we where doing
@@ -372,7 +374,7 @@ sub mtr_report_stats ($) {
if ( $tot_failed != 0 || $found_problems)
{
mtr_error("there were failing test cases");
mtr_error("there were failing test cases") unless $dont_error;
}
}

View File

@@ -313,7 +313,7 @@ sub main {
#######################################################################
my $num_tests= @$tests;
if ( not defined $opt_parallel ) {
if ( $opt_parallel eq "auto" ) {
# Try to find a suitable value for number of workers
my $sys_info= My::SysInfo->new();
@@ -528,6 +528,8 @@ sub run_test_server ($$$) {
elsif ($opt_max_test_fail > 0 and
$num_failed_test >= $opt_max_test_fail) {
$suite_timeout_proc->kill();
push(@$completed, $result);
mtr_report_stats($completed, 1);
mtr_report("Too many tests($num_failed_test) failed!",
"Terminating...");
return undef;
@@ -659,6 +661,7 @@ sub run_test_server ($$$) {
# ----------------------------------------------------
if ( ! $suite_timeout_proc->wait_one(0) )
{
mtr_report_stats($completed, 1);
mtr_report("Test suite timeout! Terminating...");
return undef;
}
@@ -723,6 +726,8 @@ sub run_worker ($) {
delete($test->{'comment'});
delete($test->{'logfile'});
$test->{worker} = $thread_num if $opt_parallel > 1;
run_testcase($test);
#$test->{result}= 'MTR_RES_PASSED';
# Send it back, now with results set
@@ -790,7 +795,7 @@ sub command_line_setup {
'vs-config' => \$opt_vs_config,
# Max number of parallel threads to use
'parallel=i' => \$opt_parallel,
'parallel=s' => \$opt_parallel,
# Config file to use as template for all tests
'defaults-file=s' => \&collect_option,
@@ -1130,9 +1135,9 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Check parallel value
# --------------------------------------------------------------------------
if ($opt_parallel < 1)
if ($opt_parallel ne "auto" && $opt_parallel < 1)
{
mtr_error("0 or negative parallel value makes no sense, use positive number");
mtr_error("0 or negative parallel value makes no sense, use 'auto' or positive number");
}
# --------------------------------------------------------------------------
@@ -5197,6 +5202,7 @@ Misc options
fast Run as fast as possible, dont't wait for servers
to shutdown etc.
parallel=N Run tests in N parallel threads (default=1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
retry=N Retry tests that fail N times, limit number of failures
to $opt_retry_failure

View File

@@ -545,6 +545,8 @@ mysqltest: At line 1: Failed to open file 'non_existing_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'from_file' to command 'move_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'move_file'
mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
@@ -697,6 +699,7 @@ statement="SHOW COLUMNS FROM t1" row_number=1, column_name="Type", Value=int(11)
statement=SHOW COLUMNS FROM t1 row_number=1, column_name=Default, Value=NULL
value= ->A B<-
value= 1
value= 2
mysqltest: At line 1: query_get_value - argument list started with '(' must be ended with ')'
mysqltest: At line 1: Missing required argument 'query' to command 'query_get_value'
mysqltest: At line 1: Missing required argument 'column name' to command 'query_get_value'

View File

@@ -212,7 +212,7 @@ GRANT PROCESS ON *.* TO ''@'localhost';
--echo anonymous user with PROCESS privilege
--echo SHOW/SELECT shows all processes/threads.
--echo ####################################################################################
connect (anonymous1,localhost,'',,information_schema);
connect (anonymous1,localhost,"''",,information_schema);
SHOW GRANTS;
--replace_column 1 ID 3 HOST_NAME 6 TIME
SHOW processlist;
@@ -253,7 +253,7 @@ REVOKE PROCESS ON *.* FROM ''@'localhost';
--echo ####################################################################################
--echo 7.1 New connection (anonymous2,localhost,'',,information_schema)
connect (anonymous2,localhost,'',,information_schema);
connect (anonymous2,localhost,"''",,information_schema);
--echo The anonymous user has no more the PROCESS privilege
--echo Again only the processes of the anonymous user are visible.
--echo ####################################################################################

View File

@@ -55,7 +55,8 @@ disconnect con4;
connect (fail_con,localhost,test,,test2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,,"");
# Need to protect "" within '' so it's interpreted literally
connect (fail_con,localhost,test,,'""');
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,zorro,test2);

View File

@@ -1780,6 +1780,56 @@ remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
# test for move_file
# ----------------------------------------------------------------------------
# - Check that if source file does not exist, nothing will be created.
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
# - Check that if source file exists, everything works properly.
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
# - Check that if destination file exists, everything works properly.
# (file2.tmp exists from the previous check; file1.tmp needs to be created)
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
# - Check usage.
--error 1
--exec echo "move_file ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "move_file from_file;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
# test for chmod
# ----------------------------------------------------------------------------
@@ -2037,6 +2087,10 @@ let $value= query_get_value(SELECT 'A B' AS "MyColumn", MyColumn, 1);
let $value= query_get_value(SELECT 1 AS "My Column", My Column, 1);
--echo value= $value
#
# 4.1 Query containing , protected by quotes, quotes also on column
let $value= query_get_value('SELECT 1 as a, 2 as b', "b", 1);
--echo value= $value
#
#------------ Negative tests ------------
# 5. Incomplete statement including missing parameters
# 5.1 incomplete statement