[Commits] 402c42b: Refactored some code.

IgorBabaev igor at mariadb.com
Mon Apr 2 01:23:12 EEST 2018


revision-id: 402c42b98f0d14bb561a10739e1af4b615ca899d (mariadb-10.3.1-137-g402c42b)
parent(s): 6aceee871d24a4e2f65e497eb280dd0095e99d31
author: Igor Babaev
committer: Igor Babaev
timestamp: 2018-04-01 15:23:12 -0700
message:

Refactored some code.

---
 sql/sql_lex.cc  | 1 +
 sql/sql_yacc.yy | 7 ++-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 4f481b2..790463a 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1367,6 +1367,7 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
     }
     break;
   case PARTITION_SYM:
+  case SELECT_SYM:
   case UNION_SYM:
     if (thd->lex->current_select && 
         thd->lex->current_select->parsing_place == BEFORE_OPT_FIELD_LIST)
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 25e7d2a..a2eab12 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -8765,11 +8765,8 @@ query_specification:
           {
             SELECT_LEX *sel;
             LEX *lex= Lex;
-            if (lex->current_select &&
-                lex->current_select->parsing_place == BEFORE_OPT_FIELD_LIST)
-              lex->current_select->parsing_place= NO_MATTER;
-            if (!(sel= Lex->alloc_select(TRUE)) ||
-                  Lex->push_select(sel))
+            if (!(sel= lex->alloc_select(TRUE)) ||
+                  lex->push_select(sel))
               MYSQL_YYABORT;
             sel->init_select();
             sel->braces= FALSE;


More information about the commits mailing list