diff options
author | <Li-Bing.Song@sun.com> | 2010-07-29 11:24:35 +0800 |
---|---|---|
committer | <Li-Bing.Song@sun.com> | 2010-07-29 11:24:35 +0800 |
commit | c61ce4143c144765e4134490adc1e18f4cc600fc (patch) | |
tree | 1cb3a7a9fbd34fa79c77f469bbe557f689c64a68 /sql/sql_lex.h | |
parent | a0d5be1fd3d23174b62bafbb3ea838d4799fcdc4 (diff) | |
parent | 2ad690fdf8a1141be8439a7e2d53974a0d3ec923 (diff) | |
download | mariadb-git-c61ce4143c144765e4134490adc1e18f4cc600fc.tar.gz |
Manual merge
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index b8bf3b220c9..feb8079a06b 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1394,9 +1394,9 @@ public: @retval FALSE OK @retval TRUE Error */ - bool init(THD *thd, const char *buff, unsigned int length); + bool init(THD *thd, char *buff, unsigned int length); - void reset(const char *buff, unsigned int length); + void reset(char *buff, unsigned int length); /** Set the echo mode. @@ -1512,6 +1512,20 @@ public: } /** + Puts a character back into the stream, canceling + the effect of the last yyGet() or yySkip(). + Note that the echo mode should not change between calls + to unput, get, or skip from the stream. + */ + char *yyUnput(char ch) + { + *--m_ptr= ch; + if (m_echo) + m_cpp_ptr--; + return m_ptr; + } + + /** End of file indicator for the query text to parse. @return true if there are no more characters to parse */ @@ -1668,7 +1682,7 @@ public: private: /** Pointer to the current position in the raw input stream. */ - const char *m_ptr; + char *m_ptr; /** Starting position of the last token parsed, in the raw buffer. */ const char *m_tok_start; @@ -2350,7 +2364,7 @@ public: @retval FALSE OK @retval TRUE Error */ - bool init(THD *thd, const char *buff, unsigned int length) + bool init(THD *thd, char *buff, unsigned int length) { return m_lip.init(thd, buff, length); } @@ -2361,7 +2375,7 @@ public: Lex_input_stream m_lip; Yacc_state m_yacc; - void reset(const char *found_semicolon, unsigned int length) + void reset(char *found_semicolon, unsigned int length) { m_lip.reset(found_semicolon, length); m_yacc.reset(); |