summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-05-20 16:35:28 +0400
committerAlexander Nozdrin <alik@sun.com>2010-05-20 16:35:28 +0400
commitdabd4a1c55cabbe73350c7c9b4c2bd6ab2db2b5c (patch)
tree2b0d3650bb46050bc0438cfd5228e52e89aa3895 /sql/sql_lex.h
parenta08c47a3ace44229e8683108bd1ce4a45471b491 (diff)
parenta18861e4adab138553da6b55a7b1d7286acbe23d (diff)
downloadmariadb-git-dabd4a1c55cabbe73350c7c9b4c2bd6ab2db2b5c.tar.gz
Manual merge from mysql-trunk.
Conflicts: - mysql-test/r/partition.result - mysql-test/r/variables_debug.result - mysql-test/t/partition.test - mysql-test/t/variables_debug.test
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index a65c4da9962..e9b5ca00953 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1377,6 +1377,8 @@ public:
Lex_input_stream(THD *thd, const char* buff, unsigned int length);
~Lex_input_stream();
+ void reset(const char *buff, unsigned int length);
+
/**
Set the echo mode.
@@ -2207,8 +2209,8 @@ struct LEX: public Query_tables_list
class Set_signal_information
{
public:
- /** Constructor. */
- Set_signal_information();
+ /** Empty default constructor, use clear() */
+ Set_signal_information() {}
/** Copy constructor. */
Set_signal_information(const Set_signal_information& set);
@@ -2221,7 +2223,7 @@ public:
void clear();
/**
- For each contition item assignment, m_item[] contains the parsed tree
+ For each condition item assignment, m_item[] contains the parsed tree
that represents the expression assigned, if any.
m_item[] is an array indexed by Diag_condition_item_name.
*/
@@ -2238,8 +2240,16 @@ class Yacc_state
{
public:
Yacc_state()
- : yacc_yyss(NULL), yacc_yyvs(NULL)
- {}
+ {
+ reset();
+ }
+
+ void reset()
+ {
+ yacc_yyss= NULL;
+ yacc_yyvs= NULL;
+ m_set_signal_info.clear();
+ }
~Yacc_state();
@@ -2284,6 +2294,12 @@ public:
Lex_input_stream m_lip;
Yacc_state m_yacc;
+
+ void reset(const char *found_semicolon, unsigned int length)
+ {
+ m_lip.reset(found_semicolon, length);
+ m_yacc.reset();
+ }
};