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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7c34cd2e
Commit
7c34cd2e
authored
Feb 11, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
upmerge 31602,47389,50618
parents
80bff270
995180af
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
10 deletions
+58
-10
client/mysqltest.cc
client/mysqltest.cc
+17
-5
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+11
-0
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+8
-5
mysql-test/r/variables_community.result
mysql-test/r/variables_community.result
+0
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+22
-0
mysql-test/t/variables_community.test
mysql-test/t/variables_community.test
+0
-0
No files found.
client/mysqltest.cc
View file @
7c34cd2e
...
...
@@ -489,6 +489,8 @@ void free_replace();
void
do_get_replace_regex
(
struct
st_command
*
command
);
void
free_replace_regex
();
/* Used by sleep */
void
check_eol_junk_line
(
const
char
*
eol
);
void
free_all_replace
(){
free_replace
();
...
...
@@ -1035,7 +1037,7 @@ void check_command_args(struct st_command *command,
}
/* Check for too many arguments passed */
ptr
=
command
->
last_argument
;
while
(
ptr
<=
command
->
end
)
while
(
ptr
<=
command
->
end
&&
*
ptr
!=
'#'
)
{
if
(
*
ptr
&&
*
ptr
!=
' '
)
die
(
"Extra argument '%s' passed to '%.*s'"
,
...
...
@@ -4173,10 +4175,19 @@ void do_let(struct st_command *command)
int
do_sleep
(
struct
st_command
*
command
,
my_bool
real_sleep
)
{
int
error
=
0
;
char
*
p
=
command
->
first_argument
;
char
*
sleep_start
,
*
sleep_end
=
command
->
end
;
char
*
sleep_start
,
*
sleep_end
;
double
sleep_val
;
char
*
p
;
static
DYNAMIC_STRING
ds_sleep
;
const
struct
command_arg
sleep_args
[]
=
{
{
"sleep_delay"
,
ARG_STRING
,
TRUE
,
&
ds_sleep
,
"Number of seconds to sleep."
}
};
check_command_args
(
command
,
command
->
first_argument
,
sleep_args
,
sizeof
(
sleep_args
)
/
sizeof
(
struct
command_arg
),
' '
);
p
=
ds_sleep
.
str
;
sleep_end
=
ds_sleep
.
str
+
ds_sleep
.
length
;
while
(
my_isspace
(
charset_info
,
*
p
))
p
++
;
if
(
!*
p
)
...
...
@@ -4185,11 +4196,13 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
/* Check that arg starts with a digit, not handled by my_strtod */
if
(
!
my_isdigit
(
charset_info
,
*
sleep_start
))
die
(
"Invalid argument to %.*s
\"
%s
\"
"
,
command
->
first_word_len
,
command
->
query
,
command
->
first_argumen
t
);
command
->
query
,
sleep_star
t
);
sleep_val
=
my_strtod
(
sleep_start
,
&
sleep_end
,
&
error
);
check_eol_junk_line
(
sleep_end
);
if
(
error
)
die
(
"Invalid argument to %.*s
\"
%s
\"
"
,
command
->
first_word_len
,
command
->
query
,
command
->
first_argument
);
dynstr_free
(
&
ds_sleep
);
/* Fixed sleep time selected by --sleep option */
if
(
opt_sleep
>=
0
&&
!
real_sleep
)
...
...
@@ -4198,7 +4211,6 @@ int do_sleep(struct st_command *command, my_bool real_sleep)
DBUG_PRINT
(
"info"
,
(
"sleep_val: %f"
,
sleep_val
));
if
(
sleep_val
)
my_sleep
((
ulong
)
(
sleep_val
*
1000000L
));
command
->
last_argument
=
sleep_end
;
return
0
;
}
...
...
mysql-test/mysql-test-run.pl
View file @
7c34cd2e
...
...
@@ -945,6 +945,11 @@ sub command_line_setup {
# Find the absolute path to the test directory
$glob_mysql_test_dir
=
cwd
();
if
(
$glob_mysql_test_dir
=~
/ /
)
{
die
("
Working directory
\"
$glob_mysql_test_dir
\"
contains space
\n
"
.
"
Bailing out, cannot function properly with space in path
");
}
if
(
IS_CYGWIN
)
{
# Use mixed path format i.e c:/path/to/
...
...
@@ -1481,6 +1486,12 @@ sub collect_mysqld_features {
mtr_add_arg
(
$args
,
"
--verbose
");
mtr_add_arg
(
$args
,
"
--help
");
# Need --user=root if running as *nix root user
if
(
!
IS_WINDOWS
and
$>
==
0
)
{
mtr_add_arg
(
$args
,
"
--user=root
");
}
my
$exe_mysqld
=
find_mysqld
(
$basedir
);
my
$cmd
=
join
("
",
$exe_mysqld
,
@$args
);
my
$list
=
`
$cmd
`;
...
...
mysql-test/r/mysqltest.result
View file @
7c34cd2e
...
...
@@ -147,9 +147,10 @@ hello
hello
;;;;;;;;
# MySQL: -- The
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Extra argument '6' passed to 'sleep'
mysqltest: At line 1: Extra argument '6' passed to 'sleep'
mysqltest: At line 1: Extra argument 'A comment
show status' passed to 'sleep'
mysqltest: At line 1: End of line junk detected: "sleep 7
# Another comment
"
...
...
@@ -354,8 +355,10 @@ here is the sourced script
here is the sourced script
"hello"
"hello"
mysqltest: At line 1: Missing argument to sleep
mysqltest: At line 1: Missing argument to real_sleep
mysqltest: At line 2: Invalid argument to sleep "xyz"
mysqltest: At line 2: Invalid argument to real_sleep "xyz"
mysqltest: At line 1: Missing required argument 'sleep_delay' to command 'sleep'
mysqltest: At line 1: Missing required argument 'sleep_delay' to command 'real_sleep'
mysqltest: At line 1: Invalid argument to sleep "abc"
mysqltest: At line 1: Invalid argument to real_sleep "abc"
1
...
...
mysql-test/r/variables
+c
.result
→
mysql-test/r/variables
_community
.result
View file @
7c34cd2e
File moved
mysql-test/t/mysqltest.test
View file @
7c34cd2e
...
...
@@ -920,6 +920,28 @@ sleep 0.5;
sleep
1
;
real_sleep
1
;
# Parameter from variable, legal and illegal
let
$sleep_var
=
0.1
;
sleep
$sleep_var
;
let
$sleep_var
=
1
;
--
real_sleep
$sleep_var
--
write_file
$MYSQL_TMP_DIR
/
sleep
.
inc
let
$sleep_var
=
xyz
;
--
sleep
$sleep_var
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQL_TMP_DIR
/
sleep
.
inc
2
>&
1
--
remove_file
$MYSQL_TMP_DIR
/
sleep
.
inc
--
write_file
$MYSQL_TMP_DIR
/
sleep
.
inc
let
$sleep_var
=
xyz
;
real_sleep
$sleep_var
;
EOF
--
error
1
--
exec
$MYSQL_TEST
<
$MYSQL_TMP_DIR
/
sleep
.
inc
2
>&
1
--
remove_file
$MYSQL_TMP_DIR
/
sleep
.
inc
# Missing parameter
--
error
1
--
exec
echo
"sleep ;"
|
$MYSQL_TEST
2
>&
1
...
...
mysql-test/t/variables
+c
.test
→
mysql-test/t/variables
_community
.test
View file @
7c34cd2e
File moved
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