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
70c2bde9
Commit
70c2bde9
authored
Jul 09, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19996 Bison grammar: turn singe-character operators into <kwd>
parent
69749629
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
32 deletions
+35
-32
sql/sql_cte.cc
sql/sql_cte.cc
+3
-1
sql/sql_cte.h
sql/sql_cte.h
+1
-1
sql/sql_lex.cc
sql/sql_lex.cc
+1
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+15
-15
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+15
-15
No files found.
sql/sql_cte.cc
View file @
70c2bde9
...
...
@@ -767,7 +767,9 @@ bool With_clause::prepare_unreferenced_elements(THD *thd)
true on failure
*/
bool
With_element
::
set_unparsed_spec
(
THD
*
thd
,
char
*
spec_start
,
char
*
spec_end
,
bool
With_element
::
set_unparsed_spec
(
THD
*
thd
,
const
char
*
spec_start
,
const
char
*
spec_end
,
my_ptrdiff_t
spec_offset
)
{
stmt_prepare_mode
=
thd
->
m_parser_state
->
m_lip
.
stmt_prepare_mode
;
...
...
sql/sql_cte.h
View file @
70c2bde9
...
...
@@ -197,7 +197,7 @@ class With_element : public Sql_alloc
TABLE_LIST
*
find_first_sq_rec_ref_in_select
(
st_select_lex
*
sel
);
bool
set_unparsed_spec
(
THD
*
thd
,
c
har
*
spec_start
,
char
*
spec_end
,
bool
set_unparsed_spec
(
THD
*
thd
,
c
onst
char
*
spec_start
,
const
char
*
spec_end
,
my_ptrdiff_t
spec_offset
);
st_select_lex_unit
*
clone_parsed_spec
(
THD
*
thd
,
TABLE_LIST
*
with_table
);
...
...
sql/sql_lex.cc
View file @
70c2bde9
...
...
@@ -1510,6 +1510,7 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
case
MY_LEX_SKIP
:
// This should not happen
if
(
c
!=
')'
)
next_state
=
MY_LEX_START
;
// Allow signed numbers
yylval
->
kwd
.
set_keyword
(
m_tok_start
,
1
);
return
((
int
)
c
);
case
MY_LEX_MINUS_OR_COMMENT
:
...
...
sql/sql_yacc.yy
View file @
70c2bde9
...
...
@@ -1792,7 +1792,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <simple_string>
remember_name remember_end
remember_tok_start
remember_tok_end
remember_tok_start
wild_and_where
%type <const_simple_string>
...
...
@@ -2169,9 +2169,12 @@ END_OF_INPUT
%type <frame_exclusion> opt_window_frame_exclusion;
%type <window_frame_bound> window_frame_start window_frame_bound;
%type <
NONE
>
%type <
kwd
>
'-' '+' '*' '/' '%' '(' ')'
',' '!' '{' '}' '&' '|' AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
',' '!' '{' '}' '&' '|'
%type <NONE>
AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
MYSQL_CONCAT_SYM ORACLE_CONCAT_SYM
...
...
@@ -8814,6 +8817,7 @@ persistent_column_stat_spec:
}
table_column_list
')'
{ }
;
persistent_index_stat_spec:
...
...
@@ -8827,6 +8831,7 @@ persistent_index_stat_spec:
}
table_index_list
')'
{ }
;
table_column_list:
...
...
@@ -9593,12 +9598,6 @@ remember_tok_start:
}
;
remember_tok_end:
{
$$= (char*) YYLIP->get_tok_end();
}
;
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
...
...
@@ -12472,6 +12471,7 @@ window_spec:
opt_window_ref opt_window_partition_clause
opt_window_order_clause opt_window_frame_clause
')'
{ }
;
opt_window_ref:
...
...
@@ -15262,16 +15262,16 @@ with_list_element:
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
AS '('
remember_tok_start query_expression remember_tok_end
')'
AS '('
query_expression
')'
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
c
har *spec_start= $6
+ 1;
With_element *elem= new With_element($1, *$2, $
7
);
c
onst char *spec_start= $5.pos()
+ 1;
With_element *elem= new With_element($1, *$2, $
6
);
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
if (elem->set_unparsed_spec(thd, spec_start, $
8
,
if (elem->set_unparsed_spec(thd, spec_start, $
7.pos()
,
spec_start - query_start))
MYSQL_YYABORT;
}
...
...
@@ -17292,7 +17292,7 @@ opt_column_list:
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
| '(' column_list ')'
| '(' column_list ')'
{ }
;
column_list:
...
...
@@ -17601,7 +17601,7 @@ view_suid:
view_list_opt:
/* empty */
{}
| '(' view_list ')'
| '(' view_list ')'
{ }
;
view_list:
...
...
sql/sql_yacc_ora.yy
View file @
70c2bde9
...
...
@@ -1274,7 +1274,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <simple_string>
remember_name remember_end remember_end_opt
remember_tok_start
remember_tok_end
remember_tok_start
wild_and_where
%type <const_simple_string>
...
...
@@ -1672,9 +1672,12 @@ END_OF_INPUT
%type <frame_exclusion> opt_window_frame_exclusion;
%type <window_frame_bound> window_frame_start window_frame_bound;
%type <
NONE
>
%type <
kwd
>
'-' '+' '*' '/' '%' '(' ')'
',' '!' '{' '}' '&' '|' AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
',' '!' '{' '}' '&' '|'
%type <NONE>
AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
MYSQL_CONCAT_SYM ORACLE_CONCAT_SYM
...
...
@@ -8915,6 +8918,7 @@ persistent_column_stat_spec:
}
table_column_list
')'
{ }
;
persistent_index_stat_spec:
...
...
@@ -8928,6 +8932,7 @@ persistent_index_stat_spec:
}
table_index_list
')'
{ }
;
table_column_list:
...
...
@@ -9694,12 +9699,6 @@ remember_tok_start:
}
;
remember_tok_end:
{
$$= (char*) YYLIP->get_tok_end();
}
;
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
...
...
@@ -12582,6 +12581,7 @@ window_spec:
opt_window_ref opt_window_partition_clause
opt_window_order_clause opt_window_frame_clause
')'
{ }
;
opt_window_ref:
...
...
@@ -15394,16 +15394,16 @@ with_list_element:
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
AS '('
remember_tok_start query_expression remember_tok_end
')'
AS '('
query_expression
')'
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
c
har *spec_start= $6
+ 1;
With_element *elem= new With_element($1, *$2, $
7
);
c
onst char *spec_start= $5.pos()
+ 1;
With_element *elem= new With_element($1, *$2, $
6
);
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
if (elem->set_unparsed_spec(thd, spec_start, $
8
,
if (elem->set_unparsed_spec(thd, spec_start, $
7.pos()
,
spec_start - query_start))
MYSQL_YYABORT;
}
...
...
@@ -17511,7 +17511,7 @@ opt_column_list:
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
| '(' column_list ')'
| '(' column_list ')'
{ }
;
column_list:
...
...
@@ -17821,7 +17821,7 @@ view_suid:
view_list_opt:
/* empty */
{}
| '(' view_list ')'
| '(' view_list ')'
{ }
;
view_list:
...
...
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