diff options
author | pem@mysql.com <> | 2003-02-26 19:22:29 +0100 |
---|---|---|
committer | pem@mysql.com <> | 2003-02-26 19:22:29 +0100 |
commit | ca2e77ca7a4cd4cbdb08425044ca71f3d38def64 (patch) | |
tree | 21d88c3a00a56c11d4f65d0c77e082899658ec01 /sql/sql_lex.cc | |
parent | d8c75ec8aa867ec002c543e7931d54fd7144fd46 (diff) | |
download | mariadb-git-ca2e77ca7a4cd4cbdb08425044ca71f3d38def64.tar.gz |
Made stored FUNCTION invokation work almost always. Still buggy and unstable, and
various known problems, but good enough for a checkpoint commit.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5bd5e69cdb8..a900d87949e 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -21,6 +21,8 @@ #include "item_create.h" #include <m_ctype.h> #include <hash.h> +#include "sp.h" +#include "sp_head.h" LEX_STRING tmp_table_alias= {(char*) "tmp-table",8}; @@ -197,6 +199,17 @@ 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))) |