Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cc289473
Commit
cc289473
authored
Dec 16, 2019
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20632: prerequisite:
Removed hack with with_list
parent
961413d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
19 deletions
+20
-19
sql/sql_lex.cc
sql/sql_lex.cc
+0
-1
sql/sql_lex.h
sql/sql_lex.h
+0
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+20
-17
No files found.
sql/sql_lex.cc
View file @
cc289473
...
@@ -1224,7 +1224,6 @@ void LEX::start(THD *thd_arg)
...
@@ -1224,7 +1224,6 @@ void LEX::start(THD *thd_arg)
set_var_list
.
empty
();
set_var_list
.
empty
();
param_list
.
empty
();
param_list
.
empty
();
view_list
.
empty
();
view_list
.
empty
();
with_column_list
.
empty
();
with_persistent_for_clause
=
FALSE
;
with_persistent_for_clause
=
FALSE
;
column_list
=
NULL
;
column_list
=
NULL
;
index_list
=
NULL
;
index_list
=
NULL
;
...
...
sql/sql_lex.h
View file @
cc289473
...
@@ -3249,7 +3249,6 @@ struct LEX: public Query_tables_list
...
@@ -3249,7 +3249,6 @@ struct LEX: public Query_tables_list
List
<
Item_func_set_user_var
>
set_var_list
;
// in-query assignment list
List
<
Item_func_set_user_var
>
set_var_list
;
// in-query assignment list
List
<
Item_param
>
param_list
;
List
<
Item_param
>
param_list
;
List
<
LEX_CSTRING
>
view_list
;
// view list (list of field names in view)
List
<
LEX_CSTRING
>
view_list
;
// view list (list of field names in view)
List
<
LEX_CSTRING
>
with_column_list
;
// list of column names in with_list_element
List
<
LEX_STRING
>
*
column_list
;
// list of column names (in ANALYZE)
List
<
LEX_STRING
>
*
column_list
;
// list of column names (in ANALYZE)
List
<
LEX_STRING
>
*
index_list
;
// list of index names (in ANALYZE)
List
<
LEX_STRING
>
*
index_list
;
// list of index names (in ANALYZE)
/*
/*
...
...
sql/sql_yacc.yy
View file @
cc289473
...
@@ -1717,7 +1717,7 @@ End SQL_MODE_ORACLE_SPECIFIC */
...
@@ -1717,7 +1717,7 @@ End SQL_MODE_ORACLE_SPECIFIC */
%type <lex_str_ptr> query_name
%type <lex_str_ptr> query_name
%type <lex_str_list> opt_with_column_list
%type <lex_str_list> opt_with_column_list
with_column_list
%type <vers_range_unit> opt_history_unit
%type <vers_range_unit> opt_history_unit
%type <vers_history_point> history_point
%type <vers_history_point> history_point
...
@@ -14692,22 +14692,16 @@ with_list:
...
@@ -14692,22 +14692,16 @@ with_list:
with_list_element:
with_list_element:
query_name
query_name
opt_with_column_list
opt_with_column_list
{
$2= new List<LEX_CSTRING> (Lex->with_column_list);
if (unlikely($2 == NULL))
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
AS '(' query_expression ')'
AS '(' query_expression ')'
{
{
LEX *lex= thd->lex;
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
: thd->query();
const char *spec_start= $
5
.pos() + 1;
const char *spec_start= $
4
.pos() + 1;
With_element *elem= new With_element($1, *$2, $
6
);
With_element *elem= new With_element($1, *$2, $
5
);
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
MYSQL_YYABORT;
if (elem->set_unparsed_spec(thd, spec_start, $
7
.pos(),
if (elem->set_unparsed_spec(thd, spec_start, $
6
.pos(),
spec_start - query_start))
spec_start - query_start))
MYSQL_YYABORT;
MYSQL_YYABORT;
}
}
...
@@ -14716,22 +14710,31 @@ with_list_element:
...
@@ -14716,22 +14710,31 @@ with_list_element:
opt_with_column_list:
opt_with_column_list:
/* empty */
/* empty */
{ $$= NULL; }
{
if (($$= new (thd->mem_root) List<LEX_CSTRING>) == NULL)
MYSQL_YYABORT;
}
| '(' with_column_list ')'
| '(' with_column_list ')'
{ $$=
NULL
; }
{ $$=
$2
; }
;
;
with_column_list:
with_column_list:
ident
ident
{
{
Lex->with_column_list.push_back((LEX_CSTRING*)
thd->memdup(&$1, sizeof(LEX_CSTRING)));
$$= new (thd->mem_root) List<LEX_CSTRING>;
if (unlikely($$ == NULL) ||
unlikely($$->push_back((LEX_CSTRING*)
thd->memdup(&$1, sizeof(LEX_CSTRING)),
thd->mem_root)))
MYSQL_YYABORT;
}
}
| with_column_list ',' ident
| with_column_list ',' ident
{
{
Lex->with_column_list.push_back((LEX_CSTRING*)
$1->push_back((LEX_CSTRING*)
thd->memdup(&$3, sizeof(LEX_CSTRING)));
thd->memdup(&$3, sizeof(LEX_CSTRING)),
thd->mem_root);
$$= $1;
}
}
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment