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
713f8055
Commit
713f8055
authored
Nov 19, 2009
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge 48671
parents
d97cc562
b229781c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
32 deletions
+57
-32
client/mysqltest.cc
client/mysqltest.cc
+41
-32
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+2
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+14
-0
No files found.
client/mysqltest.cc
View file @
713f8055
...
@@ -3632,13 +3632,22 @@ void do_perl(struct st_command *command)
...
@@ -3632,13 +3632,22 @@ void do_perl(struct st_command *command)
sizeof
(
perl_args
)
/
sizeof
(
struct
command_arg
),
sizeof
(
perl_args
)
/
sizeof
(
struct
command_arg
),
' '
);
' '
);
ds_script
=
command
->
content
;
/* If it hasn't been done already by a loop iteration, fill it in */
if
(
!
ds_script
.
str
)
{
/* If no delimiter was provided, use EOF */
/* If no delimiter was provided, use EOF */
if
(
ds_delimiter
.
length
==
0
)
if
(
ds_delimiter
.
length
==
0
)
dynstr_set
(
&
ds_delimiter
,
"EOF"
);
dynstr_set
(
&
ds_delimiter
,
"EOF"
);
init_dynamic_string
(
&
ds_script
,
""
,
1024
,
1024
);
init_dynamic_string
(
&
ds_script
,
""
,
1024
,
1024
);
read_until_delimiter
(
&
ds_script
,
&
ds_delimiter
);
read_until_delimiter
(
&
ds_script
,
&
ds_delimiter
);
command
->
content
=
ds_script
;
}
/* This function could be called even if "false", so check before doing */
if
(
cur_block
->
ok
)
{
DBUG_PRINT
(
"info"
,
(
"Executing perl: %s"
,
ds_script
.
str
));
DBUG_PRINT
(
"info"
,
(
"Executing perl: %s"
,
ds_script
.
str
));
/* Create temporary file name */
/* Create temporary file name */
...
@@ -3674,7 +3683,7 @@ void do_perl(struct st_command *command)
...
@@ -3674,7 +3683,7 @@ void do_perl(struct st_command *command)
my_delete
(
temp_file_path
,
MYF
(
0
));
my_delete
(
temp_file_path
,
MYF
(
0
));
handle_command_error
(
command
,
WEXITSTATUS
(
error
));
handle_command_error
(
command
,
WEXITSTATUS
(
error
));
dynstr_free
(
&
ds_script
);
}
dynstr_free
(
&
ds_delimiter
);
dynstr_free
(
&
ds_delimiter
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
mysql-test/r/mysqltest.result
View file @
713f8055
...
@@ -553,6 +553,8 @@ hello
...
@@ -553,6 +553,8 @@ hello
mysqltest: At line 1: Max delimiter length(16) exceeded
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
hello
hello
val is 5
val is 5
mysqltest: At line 1: test of die
mysqltest: At line 1: test of die
Some output
Some output
create table t1( a int, b char(255), c timestamp);
create table t1( a int, b char(255), c timestamp);
...
...
mysql-test/t/mysqltest.test
View file @
713f8055
...
@@ -1905,6 +1905,20 @@ perl;
...
@@ -1905,6 +1905,20 @@ perl;
print
"hello
\n
"
;
print
"hello
\n
"
;
EOF
EOF
# Test perl within while, also with if being false first iteration
let
$outer
=
3
;
let
$ifval
=
0
;
while
(
$outer
)
{
if
(
$ifval
)
{
perl
UNTIL
;
my
$val
=
5
;
print
"val is
$val
\n
"
;
UNTIL
}
inc
$ifval
;
dec
$outer
;
}
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# test for die
# test for die
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
...
...
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