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
93bb081b
Commit
93bb081b
authored
Mar 11, 2021
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes to the parser
parent
2a8899ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
+109
-0
mysql-test/main/ignore_indexes.result
mysql-test/main/ignore_indexes.result
+41
-0
mysql-test/main/ignore_indexes.test
mysql-test/main/ignore_indexes.test
+60
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+8
-0
No files found.
mysql-test/main/ignore_indexes.result
View file @
93bb081b
...
@@ -419,3 +419,44 @@ CREATE TABLE `t1` (
...
@@ -419,3 +419,44 @@ CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE t1;
DROP TABLE t1;
#
# Tests to check usage of IGNORED keyword
#
CREATE TABLE IGNORED(a INT);
DROP TABLE IGNORED;
CREATE TABLE t1(a INT);
SELECT * FROM t1 IGNORED;
a
CREATE FUNCTION f1(a INT) RETURNS INT
BEGIN
DECLARE IGNORED INT DEFAULT 0;
RETURN 0;
END|
CREATE FUNCTION f2(a INT) RETURNS INT
BEGIN
DECLARE IGNORED INT DEFAULT 0;
DECLARE x INT DEFAULT 0;
SET x= IGNORED;
RETURN 0;
END|
DROP TABLE t1;
DROP FUNCTION f1;
DROP FUNCTION f2;
CREATE PROCEDURE test_sp()
BEGIN
ignored:
LOOP
LEAVE ignored;
END LOOP;
END|
DROP PROCEDURE test_sp;
CREATE PROCEDURE test_sp()
BEGIN
set @@ignored= 1;
END|
ERROR HY000: Unknown system variable 'ignored'
CREATE PROCEDURE proc()
BEGIN
SET IGNORED= a+b;
END |
ERROR HY000: Unknown system variable 'IGNORED'
mysql-test/main/ignore_indexes.test
View file @
93bb081b
...
@@ -369,3 +369,63 @@ CREATE TABLE t1 ( a INT, KEY (a) IGNORED);
...
@@ -369,3 +369,63 @@ CREATE TABLE t1 ( a INT, KEY (a) IGNORED);
--
exec
$MYSQL_DUMP
--
compact
test
t1
--
exec
$MYSQL_DUMP
--
compact
test
t1
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Tests to check usage of IGNORED keyword
--
echo
#
CREATE
TABLE
IGNORED
(
a
INT
);
DROP
TABLE
IGNORED
;
CREATE
TABLE
t1
(
a
INT
);
SELECT
*
FROM
t1
IGNORED
;
DELIMITER
|
;
CREATE
FUNCTION
f1
(
a
INT
)
RETURNS
INT
BEGIN
DECLARE
IGNORED
INT
DEFAULT
0
;
RETURN
0
;
END
|
CREATE
FUNCTION
f2
(
a
INT
)
RETURNS
INT
BEGIN
DECLARE
IGNORED
INT
DEFAULT
0
;
DECLARE
x
INT
DEFAULT
0
;
SET
x
=
IGNORED
;
RETURN
0
;
END
|
DELIMITER
;
|
DROP
TABLE
t1
;
DROP
FUNCTION
f1
;
DROP
FUNCTION
f2
;
DELIMITER
|
;
CREATE
PROCEDURE
test_sp
()
BEGIN
ignored
:
LOOP
LEAVE
ignored
;
END
LOOP
;
END
|
DELIMITER
;
|
DROP
PROCEDURE
test_sp
;
DELIMITER
|
;
--
error
ER_UNKNOWN_SYSTEM_VARIABLE
CREATE
PROCEDURE
test_sp
()
BEGIN
set
@@
ignored
=
1
;
END
|
DELIMITER
;
|
DELIMITER
|
;
--
error
ER_UNKNOWN_SYSTEM_VARIABLE
CREATE
PROCEDURE
proc
()
BEGIN
SET
IGNORED
=
a
+
b
;
END
|
DELIMITER
;
|
sql/sql_yacc.yy
View file @
93bb081b
...
@@ -15316,6 +15316,7 @@ keyword_table_alias:
...
@@ -15316,6 +15316,7 @@ keyword_table_alias:
| keyword_verb_clause
| keyword_verb_clause
| FUNCTION_SYM
| FUNCTION_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
/* Keyword that we allow for identifiers (except SP labels) */
/* Keyword that we allow for identifiers (except SP labels) */
...
@@ -15332,6 +15333,7 @@ keyword_ident:
...
@@ -15332,6 +15333,7 @@ keyword_ident:
| FUNCTION_SYM
| FUNCTION_SYM
| WINDOW_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
keyword_sysvar_name:
keyword_sysvar_name:
...
@@ -15346,6 +15348,7 @@ keyword_sysvar_name:
...
@@ -15346,6 +15348,7 @@ keyword_sysvar_name:
| FUNCTION_SYM
| FUNCTION_SYM
| WINDOW_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
keyword_set_usual_case:
keyword_set_usual_case:
...
@@ -15360,6 +15363,7 @@ keyword_set_usual_case:
...
@@ -15360,6 +15363,7 @@ keyword_set_usual_case:
| FUNCTION_SYM
| FUNCTION_SYM
| WINDOW_SYM
| WINDOW_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
non_reserved_keyword_udt:
non_reserved_keyword_udt:
...
@@ -17872,6 +17876,7 @@ keyword_label:
...
@@ -17872,6 +17876,7 @@ keyword_label:
| keyword_sysvar_type
| keyword_sysvar_type
| FUNCTION_SYM
| FUNCTION_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
keyword_sp_decl:
keyword_sp_decl:
...
@@ -17886,6 +17891,7 @@ keyword_sp_decl:
...
@@ -17886,6 +17891,7 @@ keyword_sp_decl:
| keyword_verb_clause
| keyword_verb_clause
| FUNCTION_SYM
| FUNCTION_SYM
| WINDOW_SYM
| WINDOW_SYM
| IGNORED_SYM
;
;
opt_truncate_table_storage_clause:
opt_truncate_table_storage_clause:
...
@@ -18285,6 +18291,7 @@ keyword_label:
...
@@ -18285,6 +18291,7 @@ keyword_label:
| FUNCTION_SYM
| FUNCTION_SYM
| COMPRESSED_SYM
| COMPRESSED_SYM
| EXCEPTION_ORACLE_SYM
| EXCEPTION_ORACLE_SYM
| IGNORED_SYM
;
;
keyword_sp_decl:
keyword_sp_decl:
...
@@ -18295,6 +18302,7 @@ keyword_sp_decl:
...
@@ -18295,6 +18302,7 @@ keyword_sp_decl:
| keyword_sysvar_type
| keyword_sysvar_type
| keyword_verb_clause
| keyword_verb_clause
| WINDOW_SYM
| WINDOW_SYM
| IGNORED_SYM
;
;
opt_truncate_table_storage_clause:
opt_truncate_table_storage_clause:
...
...
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