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
94f83b26
Commit
94f83b26
authored
Jan 21, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: fix assertion failure in parser [closes #119]
parent
64be66b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
24 deletions
+16
-24
sql/sql_lex.cc
sql/sql_lex.cc
+0
-13
sql/sql_yacc.yy
sql/sql_yacc.yy
+16
-11
No files found.
sql/sql_lex.cc
View file @
94f83b26
...
...
@@ -1368,19 +1368,6 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
return
FOR_SYM
;
}
break
;
case
QUERY_SYM
:
token
=
lex_one_token
(
yylval
,
thd
);
lip
->
add_digest_token
(
token
,
yylval
);
switch
(
token
)
{
case
FOR_SYM
:
return
QUERY_FOR_SYM
;
default:
lip
->
lookahead_yylval
=
lip
->
yylval
;
lip
->
yylval
=
NULL
;
lip
->
lookahead_token
=
token
;
return
QUERY_SYM
;
}
break
;
default:
break
;
}
...
...
sql/sql_yacc.yy
View file @
94f83b26
...
...
@@ -861,10 +861,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%parse-param { THD *thd }
%lex-param { THD *thd }
/*
Currently there are 10
3
shift/reduce conflicts.
Currently there are 10
6
shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 10
3
%expect 10
6
/*
Comments for TOKENS.
...
...
@@ -1353,7 +1353,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token PURGE
%token QUARTER_SYM
%token QUERY_SYM
%token QUERY_FOR_SYM /* INTERNAL */
%token QUICK
%token RAISE_SYM /* Oracle-PLSQL-R */
%token RANGE_SYM /* SQL-2003-R */
...
...
@@ -8813,7 +8812,7 @@ trans_or_timestamp:
opt_query_for_system_time_clause:
/* empty */
{}
| QUERY_
FOR_SYM
SYSTEM_TIME_SYM for_system_time_expr
| QUERY_
SYM FOR_
SYSTEM_TIME_SYM for_system_time_expr
{
DBUG_ASSERT(Select);
Select->vers_conditions= Lex->vers_conditions;
...
...
@@ -11690,15 +11689,21 @@ date_time_type:
| TIMESTAMP {$$=MYSQL_TIMESTAMP_DATETIME;}
;
table_alias:
/* empty */
| AS
| '='
;
opt_table_alias:
/* empty */ { $$=0; }
| table_alias ident
| ident
{
$$= (LEX_STRING*) thd->memdup(&$1,sizeof(LEX_STRING));
if ($$ == NULL)
MYSQL_YYABORT;
}
| AS ident
{
$$= (LEX_STRING*) thd->memdup(&$2,sizeof(LEX_STRING));
if ($$ == NULL)
MYSQL_YYABORT;
}
| '=' ident
{
$$= (LEX_STRING*) thd->memdup(&$2,sizeof(LEX_STRING));
if ($$ == NULL)
...
...
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