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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
794a895c
Commit
794a895c
authored
Jun 19, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify CREATE TEMPORARY TABLE parser rule
as a bonus that makes CREATE TEMPORARY TEMPORARY TABLE illegal
parent
bfabaf64
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
18 deletions
+11
-18
mysql-test/r/temp_table.result
mysql-test/r/temp_table.result
+2
-0
mysql-test/t/temp_table.test
mysql-test/t/temp_table.test
+6
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-18
No files found.
mysql-test/r/temp_table.result
View file @
794a895c
...
@@ -291,3 +291,5 @@ test.t1 repair status OK
...
@@ -291,3 +291,5 @@ test.t1 repair status OK
test.t2 repair status OK
test.t2 repair status OK
test.t3 repair status OK
test.t3 repair status OK
DROP TABLES t1, t2, t3;
DROP TABLES t1, t2, t3;
create temporary temporary table t1 (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'temporary table t1 (a int)' at line 1
mysql-test/t/temp_table.test
View file @
794a895c
...
@@ -319,3 +319,9 @@ INSERT INTO t3 VALUES (101), (102), (103);
...
@@ -319,3 +319,9 @@ INSERT INTO t3 VALUES (101), (102), (103);
REPAIR
TABLE
t1
,
t2
,
t3
;
REPAIR
TABLE
t1
,
t2
,
t3
;
DROP
TABLES
t1
,
t2
,
t3
;
DROP
TABLES
t1
,
t2
,
t3
;
#
# CREATE TEMPORARY TEMPORARY TABLE
#
--
error
ER_PARSE_ERROR
create
temporary
temporary
table
t1
(
a
int
);
sql/sql_yacc.yy
View file @
794a895c
...
@@ -1717,8 +1717,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
...
@@ -1717,8 +1717,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <num>
%type <num>
order_dir lock_option
order_dir lock_option
udf_type opt_local opt_table_options table_options
udf_type opt_local opt_no_write_to_binlog
table_option opt_no_write_to_binlog
opt_temporary all_or_any opt_distinct
opt_temporary all_or_any opt_distinct
opt_ignore_leaves fulltext_options union_option
opt_ignore_leaves fulltext_options union_option
opt_not opt_union_order_or_limit
opt_not opt_union_order_or_limit
...
@@ -2444,7 +2443,7 @@ connection_name:
...
@@ -2444,7 +2443,7 @@ connection_name:
/* create a table */
/* create a table */
create:
create:
create_or_replace opt_t
able_options
TABLE_SYM opt_if_not_exists table_ident
create_or_replace opt_t
emporary
TABLE_SYM opt_if_not_exists table_ident
{
{
LEX *lex= thd->lex;
LEX *lex= thd->lex;
lex->create_info.init();
lex->create_info.init();
...
@@ -5578,20 +5577,6 @@ create_database_option:
...
@@ -5578,20 +5577,6 @@ create_database_option:
| default_charset {}
| default_charset {}
;
;
opt_table_options:
/* empty */ { $$= 0; }
| table_options { $$= $1;}
;
table_options:
table_option { $$=$1; }
| table_option table_options { $$= $1 | $2; }
;
table_option:
TEMPORARY { $$=HA_LEX_CREATE_TMP_TABLE; }
;
opt_if_not_exists_table_element:
opt_if_not_exists_table_element:
/* empty */
/* empty */
{
{
...
@@ -11960,7 +11945,7 @@ opt_if_exists:
...
@@ -11960,7 +11945,7 @@ opt_if_exists:
opt_temporary:
opt_temporary:
/* empty */ { $$= 0; }
/* empty */ { $$= 0; }
| TEMPORARY { $$= HA_LEX_CREATE_TMP_TABLE;
;
}
| TEMPORARY { $$= HA_LEX_CREATE_TMP_TABLE; }
;
;
/*
/*
** Insert : add new data to table
** Insert : add new data to table
...
...
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