mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Post-review fixes of the patch for BUG#8408: Stored procedure crash if function contains SHOW
(Review on irc by monty) mysql-test/r/sp-error.result: Renamed a procedure and function to avoid confusion mysql-test/t/sp-error.test: Renamed a procedure and function to avoid confusion sql/item_func.cc: Corrected (and better) way to set/reset the client cap. flag in Item_func_sp::execute() sql/share/errmsg.txt: Changed the ER_SP_BADSELECT error; more accurate, and includes the procedure name. sql/sql_parse.cc: Include the procedure name in the new error message.
This commit is contained in:
@ -594,8 +594,6 @@ alter function bug7047;
|
||||
return 0;
|
||||
end|
|
||||
ERROR HY000: Can't drop or alter a FUNCTION from within another stored routine
|
||||
drop function if exists bug8408|
|
||||
drop procedure if exists bug8408|
|
||||
create function bug8408() returns int
|
||||
begin
|
||||
select * from t1;
|
||||
@ -615,19 +613,21 @@ select b;
|
||||
return b;
|
||||
end|
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function bug8408() returns int
|
||||
drop function if exists bug8408_f|
|
||||
drop procedure if exists bug8408_p|
|
||||
create function bug8408_f() returns int
|
||||
begin
|
||||
call bug8408();
|
||||
call bug8408_p();
|
||||
return 0;
|
||||
end|
|
||||
create procedure bug8408()
|
||||
create procedure bug8408_p()
|
||||
select * from t1|
|
||||
call bug8408()|
|
||||
call bug8408_p()|
|
||||
val x
|
||||
select bug8408()|
|
||||
ERROR 0A000: SELECT in a stored procedure must have INTO
|
||||
drop procedure bug8408|
|
||||
drop function bug8408|
|
||||
select bug8408_f()|
|
||||
ERROR 0A000: PROCEDURE test.bug8408_p can't return a result set in the given context
|
||||
drop procedure bug8408_p|
|
||||
drop function bug8408_f|
|
||||
create function bug8408() returns int
|
||||
begin
|
||||
declare n int default 0;
|
||||
|
Reference in New Issue
Block a user