summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 9a6eb05ac5d..854f3924155 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -180,15 +180,14 @@ static int find_keyword(LEX *lex, uint len, bool function)
udf_func *udf;
if (function && using_udf_functions && (udf=find_udf((char*) tok, len)))
{
+ lex->thd->safe_to_cache_query=0;
+ lex->yylval->udf=udf;
switch (udf->returns) {
case STRING_RESULT:
- lex->yylval->udf=udf;
return (udf->type == UDFTYPE_FUNCTION) ? UDF_CHAR_FUNC : UDA_CHAR_SUM;
case REAL_RESULT:
- lex->yylval->udf=udf;
return (udf->type == UDFTYPE_FUNCTION) ? UDF_FLOAT_FUNC : UDA_FLOAT_SUM;
case INT_RESULT:
- lex->yylval->udf=udf;
return (udf->type == UDFTYPE_FUNCTION) ? UDF_INT_FUNC : UDA_INT_SUM;
}
}