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
cd1afe0a
Commit
cd1afe0a
authored
Nov 15, 2016
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-10588 sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ]
parent
c0576ba5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
0 deletions
+43
-0
mysql-test/r/keywords.result
mysql-test/r/keywords.result
+2
-0
mysql-test/suite/compat/oracle/r/truncate.result
mysql-test/suite/compat/oracle/r/truncate.result
+10
-0
mysql-test/suite/compat/oracle/t/truncate.test
mysql-test/suite/compat/oracle/t/truncate.test
+16
-0
mysql-test/t/keywords.test
mysql-test/t/keywords.test
+3
-0
sql/lex.h
sql/lex.h
+1
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-0
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+9
-0
No files found.
mysql-test/r/keywords.result
View file @
cd1afe0a
...
...
@@ -356,3 +356,5 @@ CREATE TABLE notfound (notfound int);
DROP TABLE notfound;
CREATE TABLE raise (raise int);
DROP TABLE raise;
CREATE TABLE reuse (reuse int);
DROP TABLE reuse;
mysql-test/suite/compat/oracle/r/truncate.result
0 → 100644
View file @
cd1afe0a
SET sql_mode=ORACLE;
#
# MDEV-10588 sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ]
#
CREATE TABLE t1 (a INT);
TRUNCATE TABLE t1 REUSE STORAGE;
TRUNCATE TABLE t1 DROP STORAGE;
DROP TABLE t1;
CREATE TABLE reuse (reuse INT);
DROP TABLE reuse;
mysql-test/suite/compat/oracle/t/truncate.test
0 → 100644
View file @
cd1afe0a
SET
sql_mode
=
ORACLE
;
--
echo
#
--
echo
# MDEV-10588 sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ]
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
TRUNCATE
TABLE
t1
REUSE
STORAGE
;
TRUNCATE
TABLE
t1
DROP
STORAGE
;
DROP
TABLE
t1
;
# REUSE is actually a reserved word in Oracle.
# But we don't reserve it for MDEV-10588
CREATE
TABLE
reuse
(
reuse
INT
);
DROP
TABLE
reuse
;
mysql-test/t/keywords.test
View file @
cd1afe0a
...
...
@@ -256,3 +256,6 @@ DROP TABLE notfound;
CREATE
TABLE
raise
(
raise
int
);
DROP
TABLE
raise
;
CREATE
TABLE
reuse
(
reuse
int
);
DROP
TABLE
reuse
;
sql/lex.h
View file @
cd1afe0a
...
...
@@ -517,6 +517,7 @@ static SYMBOL symbols[] = {
{
"RETURN"
,
SYM
(
RETURN_SYM
)},
{
"RETURNING"
,
SYM
(
RETURNING_SYM
)},
{
"RETURNS"
,
SYM
(
RETURNS_SYM
)},
{
"REUSE"
,
SYM
(
REUSE_SYM
)},
{
"REVERSE"
,
SYM
(
REVERSE_SYM
)},
{
"REVOKE"
,
SYM
(
REVOKE
)},
{
"RIGHT"
,
SYM
(
RIGHT
)},
...
...
sql/sql_yacc.yy
View file @
cd1afe0a
...
...
@@ -1369,6 +1369,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token RETURNING_SYM
%token RETURNS_SYM /* SQL-2003-R */
%token RETURN_SYM /* SQL-2003-R */
%token REUSE_SYM /* Oracle-R */
%token REVERSE_SYM
%token REVOKE /* SQL-2003-R */
%token RIGHT /* SQL-2003-R */
...
...
@@ -14365,6 +14366,7 @@ keyword_sp:
| RESUME_SYM {}
| RETURNED_SQLSTATE_SYM {}
| RETURNS_SYM {}
| REUSE_SYM {}
| REVERSE_SYM {}
| ROLE_SYM {}
| ROLLUP_SYM {}
...
...
sql/sql_yacc_ora.yy
View file @
cd1afe0a
...
...
@@ -786,6 +786,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token RETURNING_SYM
%token RETURNS_SYM /* SQL-2003-R */
%token RETURN_SYM /* SQL-2003-R */
%token REUSE_SYM /* Oracle-R */
%token REVERSE_SYM
%token REVOKE /* SQL-2003-R */
%token RIGHT /* SQL-2003-R */
...
...
@@ -12341,6 +12342,13 @@ truncate:
if (lex->m_sql_cmd == NULL)
MYSQL_YYABORT;
}
opt_truncate_table_storage_clause { }
;
opt_truncate_table_storage_clause:
/* Empty */
| DROP STORAGE_SYM
| REUSE_SYM STORAGE_SYM
;
opt_table_sym:
...
...
@@ -14507,6 +14515,7 @@ keyword_sp:
| RESUME_SYM {}
| RETURNED_SQLSTATE_SYM {}
| RETURNS_SYM {}
| REUSE_SYM {} /* Oracle-R */
| REVERSE_SYM {}
| ROLE_SYM {}
| ROLLUP_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