parser optimization
first try to resolve the function name as a native function, and only then look within pluggable data types
This commit is contained in:
parent
d8fbd463a0
commit
3cd4d8ddba
@ -10594,19 +10594,20 @@ function_call_generic:
|
|||||||
names are resolved with the following order:
|
names are resolved with the following order:
|
||||||
- MySQL native functions,
|
- MySQL native functions,
|
||||||
- User Defined Functions,
|
- User Defined Functions,
|
||||||
|
- Constructors, like POINT(1,1)
|
||||||
- Stored Functions (assuming the current <use> database)
|
- Stored Functions (assuming the current <use> database)
|
||||||
|
|
||||||
This will be revised with WL#2128 (SQL PATH)
|
This will be revised with WL#2128 (SQL PATH)
|
||||||
*/
|
*/
|
||||||
if ((h= Type_handler::handler_by_name(thd, $1)) &&
|
if ((builder= find_native_function_builder(thd, &$1)))
|
||||||
(item= h->make_constructor_item(thd, $4)))
|
|
||||||
{
|
|
||||||
// Found a constructor with a proper argument count
|
|
||||||
}
|
|
||||||
else if ((builder= find_native_function_builder(thd, &$1)))
|
|
||||||
{
|
{
|
||||||
item= builder->create_func(thd, &$1, $4);
|
item= builder->create_func(thd, &$1, $4);
|
||||||
}
|
}
|
||||||
|
else if ((h= Type_handler::handler_by_name(thd, $1)) &&
|
||||||
|
(item= h->make_constructor_item(thd, $4)))
|
||||||
|
{
|
||||||
|
// Found a constructor with a proper argument count
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user