summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 16:52:06 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 16:52:06 +0400
commit386929d3aee738cd0e3db335fb54e95bba8f9985 (patch)
treedd79682febb582afa1309c3b04f172d140b20aa6 /sql/sql_lex.h
parent0823afc8bf160e03ce722c5e3cef21024b63b99a (diff)
parentc2ebb0ac882feadedd0bbca71277fd2de66aa957 (diff)
downloadmariadb-git-386929d3aee738cd0e3db335fb54e95bba8f9985.tar.gz
Manual merge from the bugfix tree.
conflicts: conflict sql/sql_parse.cc
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h48
1 files changed, 44 insertions, 4 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index fb011f05f08..cefb0cb49fb 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1149,9 +1149,38 @@ enum enum_comment_state
class Lex_input_stream
{
public:
- Lex_input_stream(THD *thd, const char* buff, unsigned int length);
- ~Lex_input_stream();
+ Lex_input_stream() :
+ yylineno(1),
+ yytoklen(0),
+ yylval(NULL),
+ m_tok_start(NULL),
+ m_tok_end(NULL),
+ m_tok_start_prev(NULL),
+ m_echo(TRUE),
+ m_cpp_tok_start(NULL),
+ m_cpp_tok_start_prev(NULL),
+ m_cpp_tok_end(NULL),
+ m_body_utf8(NULL),
+ m_cpp_utf8_processed_ptr(NULL),
+ next_state(MY_LEX_START),
+ found_semicolon(NULL),
+ stmt_prepare_mode(FALSE),
+ in_comment(NO_COMMENT),
+ m_underscore_cs(NULL)
+ {
+ }
+
+ ~Lex_input_stream()
+ {
+ }
+
+ /**
+ Object initializer. Must be called before usage.
+ @retval FALSE OK
+ @retval TRUE Error
+ */
+ bool init(THD *thd, const char *buff, unsigned int length);
/**
Set the echo mode.
@@ -1933,10 +1962,21 @@ public:
class Parser_state
{
public:
- Parser_state(THD *thd, const char* buff, unsigned int length)
- : m_lip(thd, buff, length), m_yacc()
+ Parser_state()
+ : m_yacc()
{}
+ /**
+ Object initializer. Must be called before usage.
+
+ @retval FALSE OK
+ @retval TRUE Error
+ */
+ bool init(THD *thd, const char *buff, unsigned int length)
+ {
+ return m_lip.init(thd, buff, length);
+ }
+
~Parser_state()
{}