mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.7 into 10.8
This commit is contained in:
@ -746,6 +746,62 @@ DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26009: Server crash when calling twice procedure using FOR-loop
|
||||
--echo #
|
||||
|
||||
|
||||
CREATE TABLE t1 ( id int, name varchar(24));
|
||||
INSERT INTO t1 values (1, 'x'), (2, 'y'), (3, 'z');
|
||||
|
||||
create function get_name(_id int) returns varchar(24)
|
||||
return (select name from t1 where id = _id);
|
||||
|
||||
select get_name(id) from t1;
|
||||
|
||||
delimiter ^^;
|
||||
|
||||
create procedure test_proc()
|
||||
begin
|
||||
declare _cur cursor for select get_name(id) from t1;
|
||||
for row in _cur do select 1; end for;
|
||||
end;
|
||||
^^
|
||||
delimiter ;^^
|
||||
|
||||
call test_proc();
|
||||
call test_proc();
|
||||
|
||||
drop procedure test_proc;
|
||||
drop function get_name;
|
||||
drop table t1;
|
||||
|
||||
|
||||
CREATE TABLE t1 (id int, name varchar(24));
|
||||
INSERT INTO t1 (id, name) VALUES (1, 'x'),(2, 'y'),(3, 'z');
|
||||
|
||||
create function get_name(_id int) returns varchar(24)
|
||||
return (select name from t1 where id = _id);
|
||||
|
||||
create view v1 as select get_name(id) from t1;
|
||||
|
||||
delimiter $$;
|
||||
create procedure test_proc()
|
||||
begin
|
||||
declare _cur cursor for select 1 from v1;
|
||||
for row in _cur do select 1; end for;
|
||||
end$$
|
||||
delimiter ;$$
|
||||
|
||||
call test_proc();
|
||||
call test_proc();
|
||||
|
||||
drop procedure test_proc;
|
||||
drop view v1;
|
||||
drop function get_name;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.8 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user