[Commits] 02d831b: Fixed a problem with create_drop_binlog.test

IgorBabaev igor at mariadb.com
Sun Apr 1 10:02:29 EEST 2018


revision-id: 02d831bc733aefdeace4d00310564125f3824430 (mariadb-10.3.1-132-g02d831b)
parent(s): 782668c87c764c2726f931aae679b1699cec4607
author: Igor Babaev
committer: Igor Babaev
timestamp: 2018-04-01 00:02:29 -0700
message:

Fixed a problem with create_drop_binlog.test

---
 sql/sql_yacc.yy | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index f94d3f1..e0849c7 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -16758,14 +16758,22 @@ view_select:
           query_expression
           view_check_option
           {
-            SQL_I_List<TABLE_LIST> *save= &Lex->first_select_lex()->table_list;
-            Lex->set_main_unit($2);
-            if (Lex->check_main_unit_semantics())
-              MYSQL_YYABORT;
-            Lex->first_select_lex()->table_list.push_front(save);
-            Lex->current_select= Lex->first_select_lex();
-            Lex->create_view->check= $3;
-            Lex->parsing_options.allows_variable= TRUE;
+            LEX *lex= Lex; 
+            SQL_I_List<TABLE_LIST> *save= &lex->first_select_lex()->table_list;
+            lex->set_main_unit($2);
+            if (lex->check_main_unit_semantics())
+              MYSQL_YYABORT;
+            lex->first_select_lex()->table_list.push_front(save);
+            lex->current_select= Lex->first_select_lex();
+            size_t len= YYLIP->get_cpp_ptr() - lex->create_view->select.str;
+            void *create_view_select= thd->memdup(lex->create_view->select.str, len);
+            lex->create_view->select.length= len;
+            lex->create_view->select.str= (char *) create_view_select;
+            uint not_used;
+            trim_whitespace(thd->charset(),
+                            &lex->create_view->select, &not_used);
+            lex->create_view->check= $3;
+            lex->parsing_options.allows_variable= TRUE;
           }
         ;
 


More information about the commits mailing list