mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
This commit is contained in:
@ -168,38 +168,6 @@ static int find_keyword(LEX *lex, uint len, bool function)
|
||||
lex->yylval->symbol.length=len;
|
||||
return symbol->tok;
|
||||
}
|
||||
|
||||
LEX_STRING ls;
|
||||
ls.str = (char *)tok; ls.length= len;
|
||||
if (function && sp_function_exists(current_thd, &ls)) // QQ temp fix
|
||||
{
|
||||
lex->safe_to_cache_query= 0;
|
||||
lex->yylval->lex_str.str= lex->thd->strmake((char*)lex->tok_start, len);
|
||||
lex->yylval->lex_str.length= len;
|
||||
return SP_FUNC;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
udf_func *udf;
|
||||
if (function && using_udf_functions && (udf=find_udf((char*) tok, len)))
|
||||
{
|
||||
lex->safe_to_cache_query=0;
|
||||
lex->yylval->udf=udf;
|
||||
switch (udf->returns) {
|
||||
case STRING_RESULT:
|
||||
return (udf->type == UDFTYPE_FUNCTION) ? UDF_CHAR_FUNC : UDA_CHAR_SUM;
|
||||
case REAL_RESULT:
|
||||
return (udf->type == UDFTYPE_FUNCTION) ? UDF_FLOAT_FUNC : UDA_FLOAT_SUM;
|
||||
case INT_RESULT:
|
||||
return (udf->type == UDFTYPE_FUNCTION) ? UDF_INT_FUNC : UDA_INT_SUM;
|
||||
case ROW_RESULT:
|
||||
default:
|
||||
// This case should never be choosen
|
||||
DBUG_ASSERT(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user