Environment:
Embarcadero® Delphi 10.3 Version 26.0.32429.4364 libmysql.dll v5.5.62 MySql Server 5.5
If the block is opened, the cursor is commented out, then the call 'call sel_tst ()' works. With kurosorom - does not work. Neither runtime nor designtime. An error occurs:
[FireDAC][Phis][MySQL] Commands out of sync ...
Code:
CREATE DEFINER = 'root'@'localhost' PROCEDURE `sel_tst`() NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN declare cur1 cursor for select 1 from INFORMATION_SCHEMA.TABLES; ************************ open cur1; close cur1; ************************ drop temporary table if exists res_tbl; create temporary table res_tbl ( a int ); insert into res_tbl (a) values (1); insert into res_tbl (a) values (2); insert into res_tbl (a) values (3); select * from res_tbl; drop temporary table if exists res_tbl; END;