summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-08-12 12:55:37 +0400
committerAlexander Barkov <bar@mariadb.org>2017-04-05 15:02:41 +0400
commitf3a0df72f2ea15852c53b310335dd5551ae15e67 (patch)
tree2ecc30ba2a2d72fa9462195e439c34069e18a1fb /sql/sp.cc
parentdc292bc6eba5898bd266c0117aa197a0eb32ba0e (diff)
downloadmariadb-git-f3a0df72f2ea15852c53b310335dd5551ae15e67.tar.gz
Reusing code: Adding LEX::make_sp_head() and LEX::make_sp_head_no_recursive()
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 90a9ed35899..382b3abd3a3 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -35,8 +35,7 @@
#include <my_user.h>
/* Used in error handling only */
-#define SP_TYPE_STRING(type) \
- (type == TYPE_ENUM_FUNCTION ? "FUNCTION" : "PROCEDURE")
+#define SP_TYPE_STRING(type) stored_procedure_type_to_str(type)
static int
db_load_routine(THD *thd, stored_procedure_type type, sp_name *name,
@@ -1699,8 +1698,7 @@ sp_show_create_routine(THD *thd, stored_procedure_type type, sp_name *name)
If we have insufficient privileges, pretend the routine
does not exist.
*/
- my_error(ER_SP_DOES_NOT_EXIST, MYF(0),
- type == TYPE_ENUM_FUNCTION ? "FUNCTION" : "PROCEDURE",
+ my_error(ER_SP_DOES_NOT_EXIST, MYF(0), stored_procedure_type_to_str(type),
name->m_name.str);
DBUG_RETURN(TRUE);
}