1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix BUG#2259: Crash after fetch from not-open cursor in stored procedure

Initialize and test properly when cleaning up, to avoid crash in some error cases.


mysql-test/r/sp-error.result:
  Test case for BUG#2259
mysql-test/t/sp-error.test:
  Test case for BUG#2259
sql/sp_rcontext.cc:
  Cleanup in a more controlled way to avoid crashes in some error cases.
  Remove unused variable.
sql/sp_rcontext.h:
  Initialize member var, for cleanup tests.
This commit is contained in:
unknown
2004-01-08 10:37:31 +01:00
parent 952e2cd42a
commit 027535733d
4 changed files with 36 additions and 7 deletions

View File

@ -283,6 +283,15 @@ create table t3 (column_1 int)|
call bug1653()|
drop procedure bug1653|
drop table t3|
create procedure bug2259()
begin
declare v1 int;
declare c1 cursor for select s1 from t10;
fetch c1 into v1;
end|
call bug2259()|
ERROR 24000: Cursor is not open
drop procedure bug2259|
create procedure bug2272()
begin
declare v int;
@ -292,4 +301,5 @@ insert into t1 values (666, 51.3)|
call bug2272()|
ERROR 42S22: Unknown column 'v' in 'field list'
delete from t1|
drop procedure bug2272|
drop table t1|