1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed BUG#9598: stored procedure call within stored procedure

overwrites IN variable
  and added error checking of variables for [IN]OUT parameters while
  rewriting the out parameter handling.
This commit is contained in:
pem@mysql.comhem.se
2005-04-14 14:52:35 +02:00
parent c9ad5e7673
commit 6aad6835c6
9 changed files with 159 additions and 58 deletions

View File

@@ -410,6 +410,31 @@ begin
label L1;
end|
# Check in and inout arguments.
--disable_warnings
drop procedure if exists p|
--enable_warnings
create procedure p(in x int, inout y int, out z int)
begin
set y = x+y;
set z = x+y;
end|
set @tmp_x = 42|
set @tmp_y = 3|
set @tmp_z = 0|
# For reference: this is ok
call p(@tmp_x, @tmp_y, @tmp_z)|
select @tmp_x, @tmp_y, @tmp_z|
--error ER_SP_NOT_VAR_ARG
call p(42, 43, @tmp_z)|
--error ER_SP_NOT_VAR_ARG
call p(42, @tmp_y, 43)|
drop procedure p|
#
# BUG#1965
#