diff options
author | unknown <pem@mysql.comhem.se> | 2003-11-20 15:07:22 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2003-11-20 15:07:22 +0100 |
commit | 700ae43d71bd916416f0242ffb26a1c8de08275d (patch) | |
tree | 18551afe66841337aab7d18af2f2c42f00fc84bb /sql/sp.h | |
parent | afe2186e3baea84d9eec0a898ef3e9be11c788af (diff) | |
download | mariadb-git-700ae43d71bd916416f0242ffb26a1c8de08275d.tar.gz |
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.
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -18,7 +18,7 @@ #ifndef _SP_H_ #define _SP_H_ -// Return codes from sp_create_* and sp_drop_*: +// Return codes from sp_create_*, sp_drop_*, and sp_show_*: #define SP_OK 0 #define SP_KEY_NOT_FOUND -1 #define SP_OPEN_TABLE_FAILED -2 @@ -26,6 +26,7 @@ #define SP_DELETE_ROW_FAILED -4 #define SP_GET_FIELD_FAILED -5 #define SP_PARSE_ERROR -6 +#define SP_INTERNAL_ERROR -7 sp_head * sp_find_procedure(THD *thd, LEX_STRING *name); @@ -47,7 +48,7 @@ int sp_show_create_procedure(THD *thd, LEX_STRING *name); int -db_show_status_procedure(THD *thd, const char *wild); +sp_show_status_procedure(THD *thd, const char *wild); sp_head * sp_find_function(THD *thd, LEX_STRING *name); @@ -68,7 +69,7 @@ int sp_show_create_function(THD *thd, LEX_STRING *name); int -db_show_status_function(THD *thd, const char *wild); +sp_show_status_function(THD *thd, const char *wild); // QQ Temporary until the function call detection in sql_lex has been reworked. bool |