Commit 3cd4d8dd authored by Sergei Golubchik's avatar Sergei Golubchik

parser optimization

first try to resolve the function name as a native function,
and only then look within pluggable data types
parent d8fbd463
......@@ -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
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment