mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bugfixes in SHOW CREATE PROCEDURE/FUNCTION and SHOW PROCEDURE/FUNCTION STATUS;
- dropped routines should not show up in status - error handling for non-existing routines + some cleanup. mysql-test/r/sp-error.result: Test SHOW CREATE PROCEDURE for non-existing procedure. mysql-test/r/sp.result: Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show after being dropped). mysql-test/t/sp-error.test: Test SHOW CREATE PROCEDURE for non-existing procedure. mysql-test/t/sp.test: Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show after being dropped). sql/sp.cc: Fixed bug in SHOW ... STATUS after a routine has been dropped, and fixed the error return codes (for correct error handling). Also some general cleanup. sql/sp.h: Fixed prefix for external functions (should be sp_, not db_). sql/sql_parse.cc: Fixed error handling in SHOW CREATE PROCEDURE/FUNCTION.
This commit is contained in:
@ -36,6 +36,8 @@ ERROR HY000: PROCEDURE foo does not exist
|
||||
drop procedure if exists foo;
|
||||
Warnings:
|
||||
Warning 1286 PROCEDURE foo does not exist
|
||||
show create procedure foo;
|
||||
ERROR HY000: PROCEDURE foo does not exist
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
leave bar;
|
||||
|
@ -809,6 +809,8 @@ Name Type Creator Modified Created Suid Comment
|
||||
fac function root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 Y
|
||||
drop procedure ifac;
|
||||
drop function fac;
|
||||
show function status like '%f%';
|
||||
Name Type Creator Modified Created Suid Comment
|
||||
drop table if exists primes;
|
||||
create table primes (
|
||||
i int unsigned not null primary key,
|
||||
@ -908,6 +910,8 @@ i p
|
||||
drop table primes;
|
||||
drop procedure opp;
|
||||
drop procedure ip;
|
||||
show procedure status like '%p%';
|
||||
Name Type Creator Modified Created Suid Comment
|
||||
create procedure bar(x char(16), y int)
|
||||
comment "111111111111" sql security invoker
|
||||
insert into test.t1 values (x, y);
|
||||
|
@ -62,6 +62,8 @@ drop function foo|
|
||||
--error 1286
|
||||
call foo()|
|
||||
drop procedure if exists foo|
|
||||
--error 1286
|
||||
show create procedure foo|
|
||||
|
||||
# LEAVE/ITERATE with no match
|
||||
--error 1289
|
||||
|
@ -947,6 +947,8 @@ drop table fac|
|
||||
show function status like '%f%'|
|
||||
drop procedure ifac|
|
||||
drop function fac|
|
||||
--replace_column 4 '0000-00-00 00:00:00' 5 '0000-00-00 00:00:00'
|
||||
show function status like '%f%'|
|
||||
|
||||
|
||||
# primes
|
||||
@ -1034,6 +1036,8 @@ select * from primes where i=45 or i=100 or i=199|
|
||||
drop table primes|
|
||||
drop procedure opp|
|
||||
drop procedure ip|
|
||||
--replace_column 4 '0000-00-00 00:00:00' 5 '0000-00-00 00:00:00'
|
||||
show procedure status like '%p%'|
|
||||
|
||||
# Comment & suid
|
||||
create procedure bar(x char(16), y int)
|
||||
|
Reference in New Issue
Block a user