1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Manual merge

This commit is contained in:
unknown
2010-07-29 11:24:35 +08:00
9 changed files with 185 additions and 19 deletions

View File

@ -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.
@ -1511,6 +1511,20 @@ public:
m_ptr += n;
}
/**
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();