summaryrefslogtreecommitdiffstats
path: root/sql/sql_schema.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_schema.cc')
-rw-r--r--sql/sql_schema.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/sql_schema.cc b/sql/sql_schema.cc
index f08204d2..7a6c0c99 100644
--- a/sql/sql_schema.cc
+++ b/sql/sql_schema.cc
@@ -33,6 +33,12 @@ public:
return src;
}
+ Create_func *find_native_function_builder(THD *thd, const LEX_CSTRING &name)
+ const
+ {
+ return native_functions_hash_oracle.find(thd, name);
+ }
+
Item *make_item_func_replace(THD *thd,
Item *subj,
Item *find,
@@ -64,6 +70,7 @@ Schema mariadb_schema(Lex_cstring(STRING_WITH_LEN("mariadb_schema")));
Schema_oracle oracle_schema(Lex_cstring(STRING_WITH_LEN("oracle_schema")));
Schema_maxdb maxdb_schema(Lex_cstring(STRING_WITH_LEN("maxdb_schema")));
+const Schema &oracle_schema_ref= oracle_schema;
Schema *Schema::find_by_name(const LEX_CSTRING &name)
{
@@ -88,6 +95,26 @@ Schema *Schema::find_implied(THD *thd)
}
+Create_func *
+Schema::find_native_function_builder(THD *thd, const LEX_CSTRING &name) const
+{
+ return native_functions_hash.find(thd, name);
+}
+
+
+Item *Schema::make_item_func_call_native(THD *thd,
+ const Lex_ident_sys &name,
+ List<Item> *args) const
+{
+ Create_func *builder= find_native_function_builder(thd, name);
+ if (builder)
+ return builder->create_func(thd, &name, args);
+ my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), name.str);
+ return NULL;
+}
+
+
+
Item *Schema::make_item_func_replace(THD *thd,
Item *subj,
Item *find,