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
d8981060
Commit
d8981060
authored
Sep 10, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge 55178,55413,56383
parents
637c7529
4698ed2b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
6 deletions
+50
-6
client/mysqltest.cc
client/mysqltest.cc
+8
-2
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+7
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+22
-4
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+3
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+10
-0
No files found.
client/mysqltest.cc
View file @
d8981060
...
...
@@ -5542,6 +5542,8 @@ int read_line(char *buf, int size)
char
c
,
UNINIT_VAR
(
last_quote
),
last_char
=
0
;
char
*
p
=
buf
,
*
buf_end
=
buf
+
size
-
1
;
int
skip_char
=
0
;
my_bool
have_slash
=
FALSE
;
enum
{
R_NORMAL
,
R_Q
,
R_SLASH_IN_Q
,
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
DBUG_ENTER
(
"read_line"
);
...
...
@@ -5613,9 +5615,13 @@ int read_line(char *buf, int size)
}
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
{
last_quote
=
c
;
state
=
R_Q
;
if
(
!
have_slash
)
{
last_quote
=
c
;
state
=
R_Q
;
}
}
have_slash
=
(
c
==
'\\'
);
break
;
case
R_COMMENT
:
...
...
mysql-test/lib/mtr_cases.pm
View file @
d8981060
...
...
@@ -701,6 +701,13 @@ sub process_opts_file {
next
;
}
$value
=
mtr_match_prefix
(
$opt
,
"
--testcase-timeout=
");
if
(
defined
$value
)
{
# Overrides test case timeout for this test
$tinfo
->
{'
case-timeout
'}
=
$value
;
next
;
}
# Ok, this was a real option, add it
push
(
@
{
$tinfo
->
{
$opt_name
}},
$opt
);
}
...
...
mysql-test/mysql-test-run.pl
View file @
d8981060
...
...
@@ -231,7 +231,6 @@ my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 300; # minutes
my
$opt_shutdown_timeout
=
$ENV
{
MTR_SHUTDOWN_TIMEOUT
}
||
10
;
# seconds
my
$opt_start_timeout
=
$ENV
{
MTR_START_TIMEOUT
}
||
180
;
# seconds
sub
testcase_timeout
{
return
$opt_testcase_timeout
*
60
;
};
sub
suite_timeout
{
return
$opt_suite_timeout
*
60
;
};
sub
check_timeout
{
return
$opt_testcase_timeout
*
6
;
};
...
...
@@ -245,6 +244,7 @@ my $opt_repeat= 1;
my
$opt_retry
=
3
;
my
$opt_retry_failure
=
env_or_val
(
MTR_RETRY_FAILURE
=>
2
);
my
$opt_reorder
=
1
;
my
$opt_force_restart
=
0
;
my
$opt_strace_client
;
...
...
@@ -260,6 +260,17 @@ my $opt_callgrind;
my
%
mysqld_logs
;
my
$opt_debug_sync_timeout
=
300
;
# Default timeout for WAIT_FOR actions.
sub
testcase_timeout
($)
{
my
(
$tinfo
)
=
@_
;
if
(
exists
$tinfo
->
{'
case-timeout
'})
{
# Return test specific timeout if *longer* that the general timeout
my
$test_to
=
$tinfo
->
{'
case-timeout
'};
$test_to
*=
10
if
$opt_valgrind
;
return
$test_to
*
60
if
$test_to
>
$opt_testcase_timeout
;
}
return
$opt_testcase_timeout
*
60
;
}
our
$opt_warnings
=
1
;
our
$opt_skip_ndbcluster
=
0
;
...
...
@@ -934,6 +945,7 @@ sub command_line_setup {
'
report-features
'
=>
\
$opt_report_features
,
'
comment=s
'
=>
\
$opt_comment
,
'
fast
'
=>
\
$opt_fast
,
'
force-restart
'
=>
\
$opt_force_restart
,
'
reorder!
'
=>
\
$opt_reorder
,
'
enable-disabled
'
=>
\&
collect_option
,
'
verbose+
'
=>
\
$opt_verbose
,
...
...
@@ -3552,7 +3564,7 @@ sub run_testcase ($) {
}
}
my
$test_timeout
=
start_timer
(
testcase_timeout
());
my
$test_timeout
=
start_timer
(
testcase_timeout
(
$tinfo
));
do_before_run_mysqltest
(
$tinfo
);
...
...
@@ -3752,7 +3764,7 @@ sub run_testcase ($) {
{
my
$log_file_name
=
$opt_vardir
.
"
/log/
"
.
$tinfo
->
{
shortname
}
.
"
.log
";
$tinfo
->
{
comment
}
=
"
Test case timeout after
"
.
testcase_timeout
()
.
"
Test case timeout after
"
.
testcase_timeout
(
$tinfo
)
.
"
seconds
\n\n
";
# Add 20 last executed commands from test case log file
if
(
-
e
$log_file_name
)
...
...
@@ -3761,7 +3773,7 @@ sub run_testcase ($) {
"
==
$log_file_name
==
\n
"
.
mtr_lastlinesfromfile
(
$log_file_name
,
20
)
.
"
\n
";
}
$tinfo
->
{'
timeout
'}
=
testcase_timeout
();
# Mark as timeout
$tinfo
->
{'
timeout
'}
=
testcase_timeout
(
$tinfo
);
# Mark as timeout
run_on_all
(
$tinfo
,
'
analyze-timeout
');
report_failure_and_restart
(
$tinfo
);
...
...
@@ -4567,6 +4579,11 @@ sub server_need_restart {
return
1
;
}
if
(
$opt_force_restart
)
{
mtr_verbose_restart
(
$server
,
"
forced restart turned on
");
return
1
;
}
if
(
$tinfo
->
{
template_path
}
ne
$current_config_name
)
{
mtr_verbose_restart
(
$server
,
"
using different config file
");
...
...
@@ -5595,6 +5612,7 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers
to shutdown etc.
force-restart Always restart servers between tests
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
...
...
mysql-test/r/mysqltest.result
View file @
d8981060
...
...
@@ -262,6 +262,9 @@ a long \$where variable content
banana = banana
Not a banana: ba\$cat\$cat
with\`some"escaped\'quotes
with\`some"escaped\'quotes
single'tick`backtick
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing assignment operator in let
...
...
mysql-test/t/mysqltest.test
View file @
d8981060
...
...
@@ -701,6 +701,16 @@ echo banana = $cat;
let
$cat
=
ba
\\\
$cat
\\\
$cat
;
echo
Not
a
banana
:
$cat
;
# Bug #55413 would cause this to fail
let
$escape
=
with
\
`some\"escaped\'quotes;
echo $escape;
--let $escape= with\`some\"escaped\'quotes
echo $escape;
# This only works with "--let" syntax
--let $tick= single'tick`
backtick
echo
$tick
;
# Test illegal uses of let
...
...
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