Skip to content
Permalink
Browse files
parser optimization
first try to resolve the function name as a native function,
and only then look within pluggable data types
  • Loading branch information
vuvova committed Oct 24, 2020
1 parent d8fbd46 commit 3cd4d8d
Showing 1 changed file with 6 additions and 5 deletions.
@@ -10594,18 +10594,19 @@ function_call_generic:
names are resolved with the following order:
- MySQL native functions,
- User Defined Functions,
- Constructors, like POINT(1,1)
- Stored Functions (assuming the current <use> database)

This will be revised with WL#2128 (SQL PATH)
*/
if ((h= Type_handler::handler_by_name(thd, $1)) &&
(item= h->make_constructor_item(thd, $4)))
if ((builder= find_native_function_builder(thd, &$1)))
{
// Found a constructor with a proper argument count
item= builder->create_func(thd, &$1, $4);
}
else if ((builder= find_native_function_builder(thd, &$1)))
else if ((h= Type_handler::handler_by_name(thd, $1)) &&
(item= h->make_constructor_item(thd, $4)))
{
item= builder->create_func(thd, &$1, $4);
// Found a constructor with a proper argument count
}
else
{

0 comments on commit 3cd4d8d

Please sign in to comment.