Commit 98d7964d authored by jimw@mysql.com's avatar jimw@mysql.com

Fix 'SHOW CREATE FUNCTION' to say 'FUNCTION' in its error message. (Bug #6338)

parent a5ccba28
...@@ -47,6 +47,8 @@ Warnings: ...@@ -47,6 +47,8 @@ Warnings:
Note 1305 PROCEDURE foo does not exist Note 1305 PROCEDURE foo does not exist
show create procedure foo| show create procedure foo|
ERROR 42000: PROCEDURE foo does not exist ERROR 42000: PROCEDURE foo does not exist
show create function foo|
ERROR 42000: FUNCTION foo does not exist
create procedure foo() create procedure foo()
foo: loop foo: loop
leave bar; leave bar;
......
...@@ -81,6 +81,8 @@ call foo()| ...@@ -81,6 +81,8 @@ call foo()|
drop procedure if exists foo| drop procedure if exists foo|
--error 1305 --error 1305
show create procedure foo| show create procedure foo|
--error 1305
show create function foo|
# LEAVE/ITERATE/GOTO with no match # LEAVE/ITERATE/GOTO with no match
--error 1308 --error 1308
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#define SP_COM_STRING(LP) \ #define SP_COM_STRING(LP) \
((LP)->sql_command == SQLCOM_CREATE_SPFUNCTION || \ ((LP)->sql_command == SQLCOM_CREATE_SPFUNCTION || \
(LP)->sql_command == SQLCOM_ALTER_FUNCTION || \ (LP)->sql_command == SQLCOM_ALTER_FUNCTION || \
(LP)->sql_command == SQLCOM_SHOW_CREATE_FUNC || \
(LP)->sql_command == SQLCOM_DROP_FUNCTION ? \ (LP)->sql_command == SQLCOM_DROP_FUNCTION ? \
"FUNCTION" : "PROCEDURE") "FUNCTION" : "PROCEDURE")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment