Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c38aa1b0
Commit
c38aa1b0
authored
Oct 04, 2010
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
merge2
parents
367bfa41
9ee0d568
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
201 additions
and
74 deletions
+201
-74
client/mysqltest.cc
client/mysqltest.cc
+90
-23
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+8
-3
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+23
-7
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+18
-10
mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
+2
-2
mysql-test/suite/sys_vars/t/div_precision_increment_func.test
...l-test/suite/sys_vars/t/div_precision_increment_func.test
+1
-1
mysql-test/suite/sys_vars/t/secure_file_priv.test
mysql-test/suite/sys_vars/t/secure_file_priv.test
+1
-1
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+58
-27
No files found.
client/mysqltest.cc
View file @
c38aa1b0
This diff is collapsed.
Click to expand it.
mysql-test/lib/mtr_report.pm
View file @
c38aa1b0
...
...
@@ -229,7 +229,8 @@ sub mtr_report_stats ($$;$) {
# Find out how we where doing
# ----------------------------------------------------------------------
my
$tot_skiped
=
0
;
my
$tot_skipped
=
0
;
my
$tot_skipdetect
=
0
;
my
$tot_passed
=
0
;
my
$tot_failed
=
0
;
my
$tot_tests
=
0
;
...
...
@@ -246,8 +247,9 @@ sub mtr_report_stats ($$;$) {
}
elsif
(
$tinfo
->
{'
result
'}
eq
'
MTR_RES_SKIPPED
'
)
{
# Test was skipped
$tot_skiped
++
;
# Test was skipped (disabled not counted)
$tot_skipped
++
unless
$tinfo
->
{'
disable
'};
$tot_skipdetect
++
if
$tinfo
->
{'
skip_detected_by_test
'};
}
elsif
(
$tinfo
->
{'
result
'}
eq
'
MTR_RES_PASSED
'
)
{
...
...
@@ -376,6 +378,9 @@ sub mtr_report_stats ($$;$) {
print
"
All
$tot_tests
tests were successful.
\n\n
";
}
print
"
$tot_skipped
tests were skipped,
"
.
"
$tot_skipdetect
by the test itself.
\n\n
"
if
$tot_skipped
;
if
(
$tot_failed
!=
0
||
$found_problems
)
{
mtr_error
("
there were failing test cases
")
unless
$dont_error
;
...
...
mysql-test/mysql-test-run.pl
View file @
c38aa1b0
...
...
@@ -126,12 +126,24 @@ my $path_vardir_trace; # unix formatted opt_vardir for trace files
my
$opt_tmpdir
;
# Path to use for tmp/ dir
my
$opt_tmpdir_pid
;
my
$opt_start
;
my
$opt_start_dirty
;
my
$opt_start_exit
;
my
$start_only
;
END
{
if
(
defined
$opt_tmpdir_pid
and
$opt_tmpdir_pid
==
$$
)
{
# Remove the tempdir this process has created
mtr_verbose
("
Removing tmpdir '
$opt_tmpdir
");
rmtree
(
$opt_tmpdir
);
if
(
!
$opt_start_exit
)
{
# Remove the tempdir this process has created
mtr_verbose
("
Removing tmpdir
$opt_tmpdir
");
rmtree
(
$opt_tmpdir
);
}
else
{
mtr_warning
("
tmpdir
$opt_tmpdir
should be removed after the server has finished
");
}
}
}
...
...
@@ -234,10 +246,6 @@ my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
sub
suite_timeout
{
return
$opt_suite_timeout
*
60
;
};
sub
check_timeout
{
return
$opt_testcase_timeout
*
6
;
};
my
$opt_start
;
my
$opt_start_dirty
;
my
$opt_start_exit
;
my
$start_only
;
my
$opt_wait_all
;
my
$opt_user_args
;
my
$opt_repeat
=
1
;
...
...
@@ -2186,6 +2194,11 @@ sub environment_setup {
# to detect that valgrind is being used from test cases
$ENV
{'
VALGRIND_TEST
'}
=
$opt_valgrind
;
# Add dir of this perl to aid mysqltest in finding perl
my
$perldir
=
dirname
(
$^X
);
my
$pathsep
=
"
:
";
$pathsep
=
"
;
"
if
IS_WINDOWS
&&
!
IS_CYGWIN
;
$ENV
{'
PATH
'}
=
"
$ENV
{'PATH'}
"
.
$pathsep
.
$perldir
;
}
...
...
@@ -3658,6 +3671,9 @@ sub run_testcase ($) {
# Try to get reason from test log file
find_testcase_skipped_reason
(
$tinfo
);
mtr_report_test_skipped
(
$tinfo
);
# Restart if skipped due to missing perl, it may have had side effects
stop_all_servers
(
$opt_shutdown_timeout
)
if
(
$tinfo
->
{'
comment
'}
=~
/^perl not found/
);
}
elsif
(
$res
==
65
)
{
...
...
mysql-test/r/mysqltest.result
View file @
c38aa1b0
...
...
@@ -177,6 +177,9 @@ mysqltest: At line 1: End of line junk detected: "disconnect default # comment
"
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Spurious text after `query` expression
mysqltest: At line 1: Spurious text after `query` expression
mysqltest: At line 2: Spurious text after `query` expression
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
...
...
@@ -366,23 +369,24 @@ mysqltest: At line 1: Missing required argument 'sleep_delay' to command 'real_s
mysqltest: At line 1: Invalid argument to sleep "abc"
mysqltest: At line 1: Invalid argument to real_sleep "abc"
1
2
101
hej
1
-99
mysqltest: At line 1: Missing argument to inc
mysqltest: At line 1: The argument to inc must be a variable (start with $)
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
mysqltest: At line 1: End of line junk detected: "1000"
4
4
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
-96
-96
-1
-2
99
hej
-1
mysqltest: At line 1: Missing argument to dec
mysqltest: At line 1: The argument to dec must be a variable (start with $)
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
mysqltest: At line 1: End of line junk detected: "1000"
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: Missing arguments to system, nothing to do!
system command 'NonExistsinfComamdn 2> /dev/null' failed
...
...
@@ -449,12 +453,16 @@ mysqltest: At line 1: Missing required argument 'host' to command 'connect'
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: 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: The test didn't produce any output
200 connects succeeded
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
show tables;
ERROR 3D000: No database selected
connect con1,localhost,root,,;
connection default;
connection con1;
disconnect con1;
connection default;
Output from mysqltest-x.inc
Output from mysqltest-x.inc
Output from mysqltest-x.inc
...
...
mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
View file @
c38aa1b0
...
...
@@ -205,7 +205,7 @@ DROP TABLE `t1`;
--
echo
===
Using
mysqlbinlog
to
detect
failure
.
Before
the
patch
mysqlbinlog
would
find
a
corrupted
event
,
thence
would
fail
.
--
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
--
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
--
exec
$MYSQL_BINLOG
$MYSQLD_DATADIR
/
master
-
bin
.
000001
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_bug42749
.
binlog
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_bug42749
.
binlog
...
...
@@ -330,7 +330,7 @@ while($ntables)
--
echo
### assertion: check that binlog is not corrupt. Using mysqlbinlog to
--
echo
### detect failure. Before the patch mysqlbinlog would find
--
echo
### a corrupted event, thence would fail.
--
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
;
--
let
$MYSQLD_DATADIR
=
`SELECT @@datadir`
--
exec
$MYSQL_BINLOG
-
v
--
hex
$MYSQLD_DATADIR
/
master
-
bin
.
000001
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqlbinlog_bug50018
.
binlog
## clean up
...
...
mysql-test/suite/sys_vars/t/div_precision_increment_func.test
View file @
c38aa1b0
...
...
@@ -19,7 +19,7 @@
# #
################################################################################
let
$save_div_precision_increment
=
`SELECT @@global.div_precision_increment`
let
$save_div_precision_increment
=
`SELECT @@global.div_precision_increment`
;
#SET @save_div_precision_increment = @@global.div_precision_increment;
...
...
mysql-test/suite/sys_vars/t/secure_file_priv.test
View file @
c38aa1b0
...
...
@@ -9,7 +9,7 @@ SHOW VARIABLES LIKE 'secure_file_priv';
# Doing this in a portable manner is difficult but we should be able to
# count on the depth of the directory hierarchy used. Three steps up from
# the datadir is the 'mysql_test' directory.
--
let
$PROTECTED_FILE
=
`SELECT concat(@@datadir,'/../../../bug50373.txt')`
;
--
let
$PROTECTED_FILE
=
`SELECT concat(@@datadir,'/../../../bug50373.txt')`
--
eval
SELECT
*
FROM
t1
INTO
OUTFILE
'$PROTECTED_FILE'
;
DELETE
FROM
t1
;
--
eval
LOAD
DATA
INFILE
'$PROTECTED_FILE'
INTO
TABLE
t1
;
...
...
mysql-test/t/mysqltest.test
View file @
c38aa1b0
...
...
@@ -494,6 +494,32 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
--
error
1
--
exec
echo
"--disable_query_log;"
|
$MYSQL_TEST
2
>&
1
#
# Extra text after ``
#
# Cannot use exec echo here as ` may or may not need to be escaped
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
let
$x
=
`select 1`
BOO
;
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
;
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
--
let
$x
=
`select 1`
;
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
;
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
# Missing ; in next line should be detected and cause failure
let
$x
=
`select 1`
let
$x
=
2
;
echo
$x
;
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
;
# Allow trailing # comment
--
sleep
1
# Wait for insert delayed to be executed.
...
...
@@ -980,16 +1006,13 @@ EOF
# ----------------------------------------------------------------------------
# Test inc
# ----------------------------------------------------------------------------
inc
$i
;
echo
$i
;
let
$i
=
0
;
inc
$i
;
echo
$i
;
let
$i
=
100
;
inc
$i
;
echo
$i
;
let
$i
=
hej
;
echo
$i
;
let
$i
=
-
100
;
inc
$i
;
echo
$i
;
...
...
@@ -998,7 +1021,13 @@ echo $i;
--
error
1
--
exec
echo
"inc i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"inc
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=100; inc
\$
i 1000; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=text; inc
\$
i; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=10cc; inc
\$
i; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
inc
$i
;
inc
$i
;
inc
$i
;
--
echo
$i
echo
$i
;
...
...
@@ -1008,25 +1037,25 @@ echo $i;
# Test dec
# ----------------------------------------------------------------------------
dec
$d
;
echo
$d
;
let
$d
=
0
;
dec
$d
;
echo
$d
;
let
$d
=
100
;
dec
$d
;
echo
$d
;
let
$d
=
hej
;
echo
$d
;
dec
$d
;
echo
$d
;
--
error
1
--
exec
echo
"dec;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"dec i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"dec
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=100; dec
\$
i 1000; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=text; dec
\$
i; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
--
error
1
--
exec
echo
"let
\$
i=10cc; dec
\$
i; echo
\$
i;"
|
$MYSQL_TEST
2
>&
1
# ----------------------------------------------------------------------------
...
...
@@ -1439,19 +1468,6 @@ eval select "$long_rep" as x;
--
error
1
--
exec
echo
"connect (con1,localhost,root,,,,,SMTP POP);"
|
$MYSQL_TEST
2
>&
1
# Repeat connect/disconnect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
let
$i
=
100
;
while
(
$i
)
{
connect
(
test_con1
,
localhost
,
root
,,);
disconnect
test_con1
;
dec
$i
;
}
EOF
--
exec
echo
"source
$MYSQLTEST_VARDIR
/tmp/mysqltest.sql; echo OK; exit;"
|
$MYSQL_TEST
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
;
# Repeat connect/disconnect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
let
$i
=
200
;
...
...
@@ -1461,9 +1477,8 @@ while ($i)
disconnect
test_con1
;
dec
$i
;
}
echo
200
connects
succeeded
;
EOF
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
error
1
--
exec
echo
"source
$MYSQLTEST_VARDIR
/tmp/mysqltest.sql;"
|
$MYSQL_TEST
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqltest
.
sql
;
...
...
@@ -1504,6 +1519,22 @@ show tables;
disconnect
con2
;
connection
default
;
# Test enable_connect_log
--
enable_connect_log
connect
(
con1
,
localhost
,
root
,,);
connection
default
;
connection
con1
;
--
disable_query_log
# These should not be logged
connect
(
con2
,
localhost
,
root
,,
*
NO
-
ONE
*
);
connection
con2
;
disconnect
con2
;
connection
con1
;
--
enable_query_log
disconnect
con1
;
connection
default
;
--
disable_connect_log
# ----------------------------------------------------------------------------
# Test mysqltest arguments
# ----------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment