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
11b666fb
Commit
11b666fb
authored
19 years ago
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
9c2446f3
c23c4c7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
mysql-test/r/ps.result
mysql-test/r/ps.result
+28
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+26
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-0
No files found.
mysql-test/r/ps.result
View file @
11b666fb
...
@@ -542,3 +542,31 @@ execute my_stmt;
...
@@ -542,3 +542,31 @@ execute my_stmt;
COUNT(*)
COUNT(*)
37
37
deallocate prepare my_stmt;
deallocate prepare my_stmt;
drop procedure if exists p1|
drop table if exists t1|
create table t1 (id int)|
insert into t1 values(1)|
create procedure p1(a int, b int)
begin
declare c int;
select max(id)+1 into c from t1;
insert into t1 select a+b;
insert into t1 select a-b;
insert into t1 select a-c;
end|
set @a= 3, @b= 4|
prepare stmt from "call p1(?, ?)"|
execute stmt using @a, @b|
execute stmt using @a, @b|
select * from t1|
id
1
7
-1
1
7
-1
-5
deallocate prepare stmt|
drop procedure p1|
drop table t1|
This diff is collapsed.
Click to expand it.
mysql-test/t/ps.test
View file @
11b666fb
...
@@ -561,3 +561,29 @@ while ($exec_loop_count)
...
@@ -561,3 +561,29 @@ while ($exec_loop_count)
dec
$exec_loop_count
;
dec
$exec_loop_count
;
}
}
deallocate
prepare
my_stmt
;
deallocate
prepare
my_stmt
;
# Test CALL in prepared mode
delimiter
|
;
--
disable_warnings
drop
procedure
if
exists
p1
|
drop
table
if
exists
t1
|
--
enable_warnings
create
table
t1
(
id
int
)
|
insert
into
t1
values
(
1
)
|
create
procedure
p1
(
a
int
,
b
int
)
begin
declare
c
int
;
select
max
(
id
)
+
1
into
c
from
t1
;
insert
into
t1
select
a
+
b
;
insert
into
t1
select
a
-
b
;
insert
into
t1
select
a
-
c
;
end
|
set
@
a
=
3
,
@
b
=
4
|
prepare
stmt
from
"call p1(?, ?)"
|
execute
stmt
using
@
a
,
@
b
|
execute
stmt
using
@
a
,
@
b
|
select
*
from
t1
|
deallocate
prepare
stmt
|
drop
procedure
p1
|
drop
table
t1
|
delimiter
;
|
This diff is collapsed.
Click to expand it.
sql/sql_prepare.cc
View file @
11b666fb
...
@@ -1654,6 +1654,7 @@ static int check_prepared_statement(Prepared_statement *stmt,
...
@@ -1654,6 +1654,7 @@ static int check_prepared_statement(Prepared_statement *stmt,
case
SQLCOM_DROP_INDEX
:
case
SQLCOM_DROP_INDEX
:
case
SQLCOM_ROLLBACK
:
case
SQLCOM_ROLLBACK
:
case
SQLCOM_TRUNCATE
:
case
SQLCOM_TRUNCATE
:
case
SQLCOM_CALL
:
break
;
break
;
default:
default:
...
...
This diff is collapsed.
Click to expand it.
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