summaryrefslogtreecommitdiff
path: root/mysql-test/suite/compat/oracle/t/parser.test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-16708: fix in test failures caused by missing warnings received in ↵Dmitry Shulga2021-06-171-2/+2
| | | | prepare response packet
* MDEV-19682 sql_mode="oracle" does not support sysdateAlexander Barkov2021-05-191-0/+72
|
* Merge 10.4 into 10.5Marko Mäkelä2020-09-041-0/+131
|\
| * MDEV-23094: Multiple calls to a Stored Procedure from another Stored ↵bb-10.4-MDEV-23094Oleksandr Byelkin2020-08-311-0/+132
| | | | | | | | | | | | | | | | Procedure crashes server Added system-SELECT to IF/WHILE/REPET/FOR for correct subqueries connecting. Added control of system/usual selects for correct error detection.
* | Merge 10.4 into 10.5Marko Mäkelä2020-06-081-0/+47
|\ \ | |/
| * MDEV-22822 sql_mode="oracle" cannot declare without variable errorsAlexander Barkov2020-06-071-0/+47
| |
* | MDEV-20735 Allow non-reserved keywords as user defined type namesAlexander Barkov2019-10-031-0/+45
| |
* | MDEV-20734 Allow reserved keywords as user defined type namesAlexander Barkov2019-10-031-0/+18
|/
* MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the ↵Alexander Barkov2018-11-131-0/+73
| | | | option_value_no_option_type grammar
* MDEV-17666 sql_mode=ORACLE: Keyword ELSEIF should not be reservedAlexander Barkov2018-11-121-0/+23
|
* A join patch for MDEV-17660 and MDEV-17661Alexander Barkov2018-11-101-0/+58
| | | | | MDEV-17660 sql_mode=ORACLE: Some keywords do not work as label names: history, system, versioning, without MDEV-17661 Add sql_mode specific tokens for the keyword DECODE
* compat/oracle.parser failed in --psSergei Golubchik2018-06-271-0/+2
|
* MDEV-16464 Oracle Comp.: Sql-Error on "SELECT name, comment FROM mysql.proc"Alexander Barkov2018-06-131-0/+48
|
* MDEV-16244 sql_mode=ORACLE: Some keywords do not work in variable declarationsAlexander Barkov2018-05-231-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Adding LEX::make_item_sysvar() and reusing it in sql_yacc.yy and sql_yacc_ora.yy. Removing the "opt_component" rule. 2. Renaming rules to better reflect their purpose: - keyword to keyword_ident - keyword_sp to keyword_label - keyword_sp_not_data_type to keyword_sp_var_and_label Also renaming: - sp_decl_ident_keyword to keyword_sp_decl for naming consistency - keyword_alias to keyword_table_alias, for consistency with ident_table_alias - keyword_sp_data_type to keyword_data_type, as it has nothing SP-specific. 3. Moving GLOBAL_SYM, LOCAL_SYM, SESSION_SYM from keyword_sp_var_and_label to a separate rule keyword_sysvar_type. We don't have system variables with these names anyway. Adding ident_sysvar_name and using it in the grammar that needs a system variable name instead of ident_or_text. This removed a number of shift/reduce conflicts between GLOBAL_SYM/LOCAL_SYM/SESSION_SYM as a variable scope and as a variable name. 4. Moving keywords BEGIN_SYM, END (in both *.yy fiels) and EXCEPTION_SYM (in sql_yacc_ora.yy) into a separate rule keyword_sp_block_section, because in Oracle verb keywords (COMMIT, DO, HANDLER, OPEN, REPAIR, ROLLBACK, SAVEPOINT, SHUTDOWN, TRUNCATE) are good variables names and can appear in e.g. DECLARE, while block keywords (BEGIN, END, EXCEPTION) are not good variable names and cannot appear in DECLARE. 5. Further splitting keyword_directly_not_assignable in sql_yacc_ora.yy: moving keyword_sp_verb_clause out. Renaming the rest of keyword_directly_not_assignable to keyword_sp_head, which represents keywords that can appear in optional clauses in CREATE PROCEDURE/FUNCTION/TRIGGER. 6. Renaming keyword_sp_verb_clause to keyword_verb_clause, as now it does not contains anything SP-specific. As a result or #4,#5,#6, the rule keyword_directly_not_assignable was replaced to three separate rules: - keyword_sp_block - keyword_sp_head - keyword_verb_clause Adding the same rules in sql_yacc.yy, for unification. 6. Adding keyword_sp_head and keyword_verb_clause into keyword_sp_decl. This fixes MDEV-16244. 7. Reorganizing the rest of keyword related rules into two groups: a. Rules defining a list of keywords and consisting of only terminal symbols: - keyword_sp_var_not_label - keyword_sp_head - keyword_sp_verb_clause - keyword_sp_block_section - keyword_sysvar_type b. Rules that combine the above lists into keyword places: - keyword_table_alias - keyword_ident - keyword_label - keyword_sysvar_name - keyword_sp_decl Rules from the group "b" use on the right side only rules from the group "a" (with optional terminal symbols added). Rules from the group "b" DO NOT mutually use each other any more. This makes them easier to read (and see the difference between them). Sorting the right sides of the group "b" keyword rules alphabetically, for yet better readability.
* MDEV-16202 Latest changes made erroneously some keywords reserved in ↵Alexander Barkov2018-05-171-0/+65
| | | | sql_mode=ORACLE
* MDEV-15620 Crash when using "SET @@NEW.a=expr" inside a triggerAlexander Barkov2018-03-271-0/+24
The problem resided in this branch of the "option_value_no_option_type" rule: | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default Summary: 1. internal_variable_name initialized tmp.var to trg_new_row_fake_var (0x01). 2. The condition "if (tmp.var == NULL)" did not check the special case with trg_new_row_fake_var, so Lex->set_system_variable(&tmp, $3, $6) was called with tmp.var pointing to trg_new_row_fake_var, which created a sys_var instance pointing to 0x01 instead of a real system variable. 3. Later, at the trigger invocation time, this method was called: sys_var::do_deprecated_warning (this=0x1, thd=0x7ffe6c000a98) Notice, "this" is equal to trg_new_row_fake_var (0x01) Solution: The old implementation with separate rules internal_variable_name (in sql_yacc.yy and sql_yacc_ora.yy) and internal_variable_name_directly_assignable (in sql_yacc_ora.yy only) was too complex and hard to follow. Rewriting the code in a more straightforward way. 1. Changing LEX::set_system_variable() from: bool set_system_variable(struct sys_var_with_base *, enum_var_type, Item *); to: bool set_system_variable(enum_var_type, sys_var *, const LEX_CSTRING *, Item *); 2. Adding new methods in LEX, which operate with variable names: bool set_trigger_field(const LEX_CSTRING *, const LEX_CSTRING *, Item *); bool set_system_variable(enum_var_type var_type, const LEX_CSTRING *name, Item *val); bool set_system_variable(THD *thd, enum_var_type var_type, const LEX_CSTRING *name1, const LEX_CSTRING *name2, Item *val); bool set_default_system_variable(enum_var_type var_type, const LEX_CSTRING *name, Item *val); bool set_variable(const LEX_CSTRING *name, Item *item); 3. Changing the grammar to call the new methods directly in option_value_no_option_type, Removing rules internal_variable_name and internal_variable_name_directly_assignable. 4. Removing "struct sys_var_with_base" and trg_new_row_fake_var. Good side effect: - The code in /sql reduced from 314 to 183 lines. - MDEV-15615 Unexpected syntax error instead of "Unknown system variable" ... was also fixed automatically