mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fixed BUG#3709: SELECT INTO 1 FROM DUAL not parsed as expected
Made the combination of INTO and FROM DUAL work, e.g. SELECT 1 INTO @x FROM DUAL. As a consequence, DUAL is made a reserved word. It would work to not have it reserved, but it was deemed to be confusing as a user defined table by the same name then must be qualified with a db (schema).
This commit is contained in:
parent
af39bd4125
commit
ba749627ae
1 changed files with 7 additions and 7 deletions
|
@ -1153,7 +1153,6 @@ merge_insert_types:
|
|||
|
||||
opt_select_from:
|
||||
opt_limit_clause {}
|
||||
| FROM DUAL_SYM {}
|
||||
| select_from select_lock_type;
|
||||
|
||||
udf_func_type:
|
||||
|
@ -2296,17 +2295,19 @@ select_part2:
|
|||
|
||||
select_into:
|
||||
opt_limit_clause {}
|
||||
| FROM DUAL_SYM /* oracle compatibility: oracle always requires FROM
|
||||
clause, and DUAL is system table without fields.
|
||||
Is "SELECT 1 FROM DUAL" any better than
|
||||
"SELECT 1" ? Hmmm :) */
|
||||
| into
|
||||
| select_from
|
||||
| into select_from
|
||||
| select_from into;
|
||||
|
||||
select_from:
|
||||
FROM join_table_list where_clause group_clause having_clause opt_order_clause opt_limit_clause procedure_clause;
|
||||
FROM join_table_list where_clause group_clause having_clause
|
||||
opt_order_clause opt_limit_clause procedure_clause
|
||||
| FROM DUAL_SYM /* oracle compatibility: oracle always requires FROM
|
||||
clause, and DUAL is system table without fields.
|
||||
Is "SELECT 1 FROM DUAL" any better than
|
||||
"SELECT 1" ? Hmmm :) */
|
||||
;
|
||||
|
||||
select_options:
|
||||
/* empty*/
|
||||
|
@ -4929,7 +4930,6 @@ keyword:
|
|||
| DIRECTORY_SYM {}
|
||||
| DISCARD {}
|
||||
| DO_SYM {}
|
||||
| DUAL_SYM {}
|
||||
| DUMPFILE {}
|
||||
| DUPLICATE_SYM {}
|
||||
| DYNAMIC_SYM {}
|
||||
|
|
Loading…
Reference in a new issue