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
72b4e939
Commit
72b4e939
authored
Dec 28, 2020
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More grammar completeness
parent
b52f018d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
54 deletions
+48
-54
sql/sql_yacc.yy
sql/sql_yacc.yy
+48
-54
No files found.
sql/sql_yacc.yy
View file @
72b4e939
...
...
@@ -12229,8 +12229,56 @@ limit_clause:
$$.empty();
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
| fetch_first_clause
{
$$= $1;
if (!$$.select_limit->basic_const_item() ||
$$.select_limit->val_int() > 0)
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
;
fetch_first_clause:
FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
{
$$.select_limit= $3;
$$.offset_limit= 0;
$$.explicit_limit= true;
$$.with_ties= $5;
}
| OFFSET_SYM limit_option
FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
{
$$.select_limit= $5;
$$.offset_limit= $2;
$$.explicit_limit= true;
$$.with_ties= $7;
}
| FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
OFFSET_SYM limit_option
{
$$.select_limit= $3;
$$.offset_limit= $7;
$$.explicit_limit= true;
$$.with_ties= $5;
}
;
first_or_next:
FIRST_SYM
| NEXT_SYM
;
row_or_rows:
ROW_SYM
| ROWS_SYM
;
only_or_with_ties:
ONLY_SYM { $$= 0; }
| WITH TIES_SYM { $$= 1; }
;
opt_global_limit_clause:
opt_limit_clause
{
...
...
@@ -12381,51 +12429,6 @@ opt_procedure_or_into:
}
;
first_or_next:
FIRST_SYM
| NEXT_SYM
;
row_or_rows:
ROW_SYM
| ROWS_SYM
;
only_or_with_ties:
ONLY_SYM
{
$$= 0;
}
| WITH TIES_SYM
{
$$= 1;
}
fetch_first_clause:
FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
{
$$.select_limit= $3;
$$.offset_limit= 0;
$$.explicit_limit= true;
$$.with_ties= $5;
}
| OFFSET_SYM limit_option
FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
{
$$.select_limit= $5;
$$.offset_limit= $2;
$$.explicit_limit= true;
$$.with_ties= $7;
}
| FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties
OFFSET_SYM limit_option
{
$$.select_limit= $3;
$$.offset_limit= $7;
$$.explicit_limit= true;
$$.with_ties= $5;
}
;
order_or_limit:
order_clause opt_limit_clause
...
...
@@ -12444,14 +12447,6 @@ order_or_limit:
$$->order_list= NULL;
$$->limit= $1;
}
| order_clause fetch_first_clause
{
$$= new(thd->mem_root) Lex_order_limit_lock;
if (!$$)
YYABORT;
$$->order_list= $1;
$$->limit= $2;
}
;
...
...
@@ -15757,7 +15752,6 @@ keyword_sp_var_and_label:
| NONE_SYM
| NOTFOUND_SYM
| OF_SYM
| OFFSET_SYM
| OLD_PASSWORD_SYM
| ONE_SYM
| ONLINE_SYM
...
...
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