mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed BUG#4318: Stored Procedure packet error if HANDLER statement,
at least partially. It doesn't crash or give packets out of order any more, but it's unclear why it doesn't actually return anything from within an SP. This should be investigated at some point, but for the moment this will have to do. (It is a rather obscure feature... :) mysql-test/r/sp.result: Test case for BUG#4318. mysql-test/t/sp.test: Test case for BUG#4318. sql/sql_yacc.yy: Recognize HANDLER READ as another statement that might result in multiple results.
This commit is contained in:
@ -1427,6 +1427,21 @@ call bug4726()|
|
||||
call bug4726()|
|
||||
drop procedure bug4726|
|
||||
drop table t3|
|
||||
drop table if exists t3|
|
||||
create table t3 (s1 int)|
|
||||
insert into t3 values (3), (4)|
|
||||
create procedure bug4318()
|
||||
handler t3 read next|
|
||||
handler t3 open|
|
||||
call bug4318()|
|
||||
s1
|
||||
3
|
||||
call bug4318()|
|
||||
s1
|
||||
4
|
||||
handler t3 close|
|
||||
drop procedure bug4318|
|
||||
drop table t3|
|
||||
drop table if exists fac|
|
||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||
create procedure ifac(n int unsigned)
|
||||
|
@ -1653,6 +1653,28 @@ call bug4726()|
|
||||
drop procedure bug4726|
|
||||
drop table t3|
|
||||
|
||||
#
|
||||
# BUG#4318
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t3|
|
||||
--enable_warnings
|
||||
|
||||
create table t3 (s1 int)|
|
||||
insert into t3 values (3), (4)|
|
||||
|
||||
create procedure bug4318()
|
||||
handler t3 read next|
|
||||
|
||||
handler t3 open|
|
||||
# Expect no results, as tables are closed, but there shouldn't be any errors
|
||||
call bug4318()|
|
||||
call bug4318()|
|
||||
handler t3 close|
|
||||
|
||||
drop procedure bug4318|
|
||||
drop table t3|
|
||||
|
||||
|
||||
#
|
||||
# Some "real" examples
|
||||
|
Reference in New Issue
Block a user