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
1f95aa82
Commit
1f95aa82
authored
Aug 30, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
upmerge 55178,55413
parents
5f4cb3a9
6d2ff118
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
7 deletions
+49
-7
.bzr-mysql/default.conf
.bzr-mysql/default.conf
+1
-1
client/mysqltest.cc
client/mysqltest.cc
+14
-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
+14
-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.
.bzr-mysql/default.conf
View file @
1f95aa82
[
MYSQL
]
[
MYSQL
]
post_commit_to
=
"commits@lists.mysql.com"
post_commit_to
=
"commits@lists.mysql.com"
post_push_to
=
"commits@lists.mysql.com"
post_push_to
=
"commits@lists.mysql.com"
tree_name
=
"mysql-5.5"
tree_name
=
"mysql-5.5
-mtr
"
client/mysqltest.cc
View file @
1f95aa82
...
@@ -5255,8 +5255,10 @@ void do_connect(struct st_command *command)
...
@@ -5255,8 +5255,10 @@ void do_connect(struct st_command *command)
}
}
#endif
#endif
#ifndef EMBEDDED_LIBRARY
if
(
opt_protocol
)
if
(
opt_protocol
)
mysql_options
(
&
con_slot
->
mysql
,
MYSQL_OPT_PROTOCOL
,
(
char
*
)
&
opt_protocol
);
mysql_options
(
&
con_slot
->
mysql
,
MYSQL_OPT_PROTOCOL
,
(
char
*
)
&
opt_protocol
);
#endif
#ifdef HAVE_SMEM
#ifdef HAVE_SMEM
if
(
con_shm
)
if
(
con_shm
)
...
@@ -5542,6 +5544,8 @@ int read_line(char *buf, int size)
...
@@ -5542,6 +5544,8 @@ int read_line(char *buf, int size)
char
c
,
UNINIT_VAR
(
last_quote
),
last_char
=
0
;
char
c
,
UNINIT_VAR
(
last_quote
),
last_char
=
0
;
char
*
p
=
buf
,
*
buf_end
=
buf
+
size
-
1
;
char
*
p
=
buf
,
*
buf_end
=
buf
+
size
-
1
;
int
skip_char
=
0
;
int
skip_char
=
0
;
my_bool
have_slash
=
FALSE
;
enum
{
R_NORMAL
,
R_Q
,
R_SLASH_IN_Q
,
enum
{
R_NORMAL
,
R_Q
,
R_SLASH_IN_Q
,
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
DBUG_ENTER
(
"read_line"
);
DBUG_ENTER
(
"read_line"
);
...
@@ -5613,9 +5617,13 @@ int read_line(char *buf, int size)
...
@@ -5613,9 +5617,13 @@ int read_line(char *buf, int size)
}
}
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
{
{
last_quote
=
c
;
if
(
!
have_slash
)
state
=
R_Q
;
{
last_quote
=
c
;
state
=
R_Q
;
}
}
}
have_slash
=
(
c
==
'\\'
);
break
;
break
;
case
R_COMMENT
:
case
R_COMMENT
:
...
@@ -6228,8 +6236,10 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
...
@@ -6228,8 +6236,10 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
print_version
();
print_version
();
exit
(
0
);
exit
(
0
);
case
OPT_MYSQL_PROTOCOL
:
case
OPT_MYSQL_PROTOCOL
:
#ifndef EMBEDDED_LIBRARY
opt_protocol
=
find_type_or_exit
(
argument
,
&
sql_protocol_typelib
,
opt_protocol
=
find_type_or_exit
(
argument
,
&
sql_protocol_typelib
,
opt
->
name
);
opt
->
name
);
#endif
break
;
break
;
case
'?'
:
case
'?'
:
usage
();
usage
();
...
@@ -7982,8 +7992,10 @@ int main(int argc, char **argv)
...
@@ -7982,8 +7992,10 @@ int main(int argc, char **argv)
mysql_options
(
&
con
->
mysql
,
MYSQL_SET_CHARSET_DIR
,
mysql_options
(
&
con
->
mysql
,
MYSQL_SET_CHARSET_DIR
,
opt_charsets_dir
);
opt_charsets_dir
);
#ifndef EMBEDDED_LIBRARY
if
(
opt_protocol
)
if
(
opt_protocol
)
mysql_options
(
&
con
->
mysql
,
MYSQL_OPT_PROTOCOL
,(
char
*
)
&
opt_protocol
);
mysql_options
(
&
con
->
mysql
,
MYSQL_OPT_PROTOCOL
,(
char
*
)
&
opt_protocol
);
#endif
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
...
...
mysql-test/lib/mtr_cases.pm
View file @
1f95aa82
...
@@ -701,6 +701,13 @@ sub process_opts_file {
...
@@ -701,6 +701,13 @@ sub process_opts_file {
next
;
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
# Ok, this was a real option, add it
push
(
@
{
$tinfo
->
{
$opt_name
}},
$opt
);
push
(
@
{
$tinfo
->
{
$opt_name
}},
$opt
);
}
}
...
...
mysql-test/mysql-test-run.pl
View file @
1f95aa82
...
@@ -231,7 +231,6 @@ my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 300; # minutes
...
@@ -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_shutdown_timeout
=
$ENV
{
MTR_SHUTDOWN_TIMEOUT
}
||
10
;
# seconds
my
$opt_start_timeout
=
$ENV
{
MTR_START_TIMEOUT
}
||
180
;
# 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
suite_timeout
{
return
$opt_suite_timeout
*
60
;
};
sub
check_timeout
{
return
$opt_testcase_timeout
*
6
;
};
sub
check_timeout
{
return
$opt_testcase_timeout
*
6
;
};
...
@@ -260,6 +259,17 @@ my $opt_callgrind;
...
@@ -260,6 +259,17 @@ my $opt_callgrind;
my
%
mysqld_logs
;
my
%
mysqld_logs
;
my
$opt_debug_sync_timeout
=
300
;
# Default timeout for WAIT_FOR actions.
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_warnings
=
1
;
our
$opt_skip_ndbcluster
=
0
;
our
$opt_skip_ndbcluster
=
0
;
...
@@ -3552,7 +3562,7 @@ sub run_testcase ($) {
...
@@ -3552,7 +3562,7 @@ sub run_testcase ($) {
}
}
}
}
my
$test_timeout
=
start_timer
(
testcase_timeout
());
my
$test_timeout
=
start_timer
(
testcase_timeout
(
$tinfo
));
do_before_run_mysqltest
(
$tinfo
);
do_before_run_mysqltest
(
$tinfo
);
...
@@ -3752,7 +3762,7 @@ sub run_testcase ($) {
...
@@ -3752,7 +3762,7 @@ sub run_testcase ($) {
{
{
my
$log_file_name
=
$opt_vardir
.
"
/log/
"
.
$tinfo
->
{
shortname
}
.
"
.log
";
my
$log_file_name
=
$opt_vardir
.
"
/log/
"
.
$tinfo
->
{
shortname
}
.
"
.log
";
$tinfo
->
{
comment
}
=
$tinfo
->
{
comment
}
=
"
Test case timeout after
"
.
testcase_timeout
()
.
"
Test case timeout after
"
.
testcase_timeout
(
$tinfo
)
.
"
seconds
\n\n
";
"
seconds
\n\n
";
# Add 20 last executed commands from test case log file
# Add 20 last executed commands from test case log file
if
(
-
e
$log_file_name
)
if
(
-
e
$log_file_name
)
...
@@ -3761,7 +3771,7 @@ sub run_testcase ($) {
...
@@ -3761,7 +3771,7 @@ sub run_testcase ($) {
"
==
$log_file_name
==
\n
"
.
"
==
$log_file_name
==
\n
"
.
mtr_lastlinesfromfile
(
$log_file_name
,
20
)
.
"
\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
');
run_on_all
(
$tinfo
,
'
analyze-timeout
');
report_failure_and_restart
(
$tinfo
);
report_failure_and_restart
(
$tinfo
);
...
...
mysql-test/r/mysqltest.result
View file @
1f95aa82
...
@@ -262,6 +262,9 @@ a long \$where variable content
...
@@ -262,6 +262,9 @@ a long \$where variable content
banana = banana
banana = banana
Not a banana: ba\$cat\$cat
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 arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing assignment operator in let
...
...
mysql-test/t/mysqltest.test
View file @
1f95aa82
...
@@ -701,6 +701,16 @@ echo banana = $cat;
...
@@ -701,6 +701,16 @@ echo banana = $cat;
let
$cat
=
ba
\\\
$cat
\\\
$cat
;
let
$cat
=
ba
\\\
$cat
\\\
$cat
;
echo
Not
a
banana
:
$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
# 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