summaryrefslogtreecommitdiff
path: root/sql/sp.h
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.h
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.h')
-rw-r--r--sql/sp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sp.h b/sql/sp.h
index 96d49cfe676..389390d996d 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -48,6 +48,20 @@ enum stored_procedure_type
TYPE_ENUM_PROXY=4
};
+
+static inline const char *
+stored_procedure_type_to_str(enum stored_procedure_type type)
+{
+ switch (type) {
+ case TYPE_ENUM_PROCEDURE: return "PROCEDURE";
+ case TYPE_ENUM_FUNCTION: return "FUNCTION";
+ case TYPE_ENUM_TRIGGER: return "TRIGGER";
+ case TYPE_ENUM_PROXY: return "PROXY";
+ }
+ DBUG_ASSERT(0);
+ return "UNKNOWN_STORED_";
+}
+
/* Tells what SP_DEFAULT_ACCESS should be mapped to */
#define SP_DEFAULT_ACCESS_MAPPING SP_CONTAINS_SQL