summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
commita3d80d952d7b99680ca4a3a89e128ecc0d490c10 (patch)
tree0d72ee69e037cdd09618ddb53652dd1b220890dc /sql/sql_lex.h
parentec06ba24553d2d83b3a6a6bc4d8150910b01ee7c (diff)
parent966661c8cc75dd7d540a5fe40b4d893c40e91d26 (diff)
downloadmariadb-git-a3d80d952d7b99680ca4a3a89e128ecc0d490c10.tar.gz
merge with 5.1
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 2f14f3eb575..020e2b4e76e 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1190,7 +1190,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);
/**
Set the echo mode.
@@ -1305,6 +1305,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
*/
@@ -1450,7 +1464,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;
@@ -1996,7 +2010,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);
}