mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix BUG#1656: Have to initialize OUT parameters too, in case they're not
later set by the procedure. mysql-test/r/sp.result: Test case for BUG#1656 mysql-test/t/sp.test: Test case for BUG#1656
This commit is contained in:
@@ -653,6 +653,17 @@ less 2
|
||||
more 17
|
||||
delete from t1;
|
||||
drop procedure bug1547;
|
||||
drop table if exists t70;
|
||||
create table t70 (s1 int,s2 int);
|
||||
insert into t70 values (1,2);
|
||||
create procedure bug1656(out p1 int, out p2 int)
|
||||
select * into p1, p1 from t70;
|
||||
call bug1656(@1, @2);
|
||||
select @1, @2;
|
||||
@1 @2
|
||||
2 NULL
|
||||
drop table t70;
|
||||
drop procedure bug1656;
|
||||
drop table if exists fac;
|
||||
create table fac (n int unsigned not null primary key, f bigint unsigned);
|
||||
create procedure ifac(n int unsigned)
|
||||
|
||||
@@ -764,6 +764,23 @@ select * from t1|
|
||||
delete from t1|
|
||||
drop procedure bug1547|
|
||||
|
||||
#
|
||||
# BUG#1656
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t70|
|
||||
--enable_warnings
|
||||
create table t70 (s1 int,s2 int)|
|
||||
insert into t70 values (1,2)|
|
||||
|
||||
create procedure bug1656(out p1 int, out p2 int)
|
||||
select * into p1, p1 from t70|
|
||||
|
||||
call bug1656(@1, @2)|
|
||||
select @1, @2|
|
||||
drop table t70|
|
||||
drop procedure bug1656|
|
||||
|
||||
|
||||
#
|
||||
# Some "real" examples
|
||||
|
||||
Reference in New Issue
Block a user