summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-09-18 13:07:31 +0200
committerSergei Golubchik <sergii@pisem.net>2013-09-18 13:07:31 +0200
commit4ec2e9d7eda78d409d1b017ef4d8928fe9055438 (patch)
tree6c3a74a740d3c1c5f3a7d1f8154d8a791b435b3f /sql/sql_lex.cc
parent1a2a9d74fe1256554eceb09bbc6752a6376df87d (diff)
parent197bdbae4db78ba65f3668803bebd3c4a4509ae5 (diff)
downloadmariadb-git-4ec2e9d7eda78d409d1b017ef4d8928fe9055438.tar.gz
5.5 merge and fixes for compiler/test errors
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 18908abbfcd..aa1fe292564 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -30,7 +30,7 @@
#include "sp.h"
#include "sql_select.h"
-static int lex_one_token(void *arg, void *yythd);
+static int lex_one_token(void *arg, THD *thd);
/*
We are using pointer to this variable for distinguishing between assignment
@@ -959,9 +959,8 @@ bool consume_comment(Lex_input_stream *lip, int remaining_recursions_permitted)
(which can't be followed by a signed number)
*/
-int MYSQLlex(void *arg, void *yythd)
+int MYSQLlex(void *arg, THD *thd)
{
- THD *thd= (THD *)yythd;
Lex_input_stream *lip= & thd->m_parser_state->m_lip;
YYSTYPE *yylval=(YYSTYPE*) arg;
int token;
@@ -979,7 +978,7 @@ int MYSQLlex(void *arg, void *yythd)
return token;
}
- token= lex_one_token(arg, yythd);
+ token= lex_one_token(arg, thd);
switch(token) {
case WITH:
@@ -990,7 +989,7 @@ int MYSQLlex(void *arg, void *yythd)
to transform the grammar into a LALR(1) grammar,
which sql_yacc.yy can process.
*/
- token= lex_one_token(arg, yythd);
+ token= lex_one_token(arg, thd);
switch(token) {
case CUBE_SYM:
return WITH_CUBE_SYM;
@@ -1013,14 +1012,13 @@ int MYSQLlex(void *arg, void *yythd)
return token;
}
-int lex_one_token(void *arg, void *yythd)
+int lex_one_token(void *arg, THD *thd)
{
reg1 uchar c;
bool comment_closed;
int tokval, result_state;
uint length;
enum my_lex_states state;
- THD *thd= (THD *)yythd;
Lex_input_stream *lip= & thd->m_parser_state->m_lip;
LEX *lex= thd->lex;
YYSTYPE *yylval=(YYSTYPE*) arg;
@@ -3787,10 +3785,7 @@ void SELECT_LEX::mark_as_belong_to_derived(TABLE_LIST *derived)
TABLE_LIST *tl;
List_iterator<TABLE_LIST> ti(leaf_tables);
while ((tl= ti++))
- {
- tl->open_type= OT_BASE_ONLY;
tl->belong_to_derived= derived;
- }
}