- 05 Apr, 2017 38 commits
-
-
Alexander Barkov authored
Fixed that the ITERATE statement inside a FOR LOOP statement did not increment the index variable before jumping to the beginning of the loop, which caused the loop to repeat endlessly.
-
Alexander Barkov authored
Adding labeled FOR LOOP
-
Alexander Barkov authored
Adding non-labeled FOR LOOP statement.
-
Alexander Barkov authored
from "const Lex_field_type_st &" to "const Column_definition &".
-
Alexander Barkov authored
Adding methods: - LEX::sp_while_loop_expression() - LEX::sp_while_loop_finalize() to reuse code between sql_yacc.yy and sql_yacc_ora.yy. FOR loop will also reuse these methods.
-
Alexander Barkov authored
Part 18: WHILE syntax
-
Alexander Barkov authored
Part 17: RETURN in stored procedures
-
Alexander Barkov authored
Part 16: CURSOR declaration
-
Alexander Barkov authored
Part 15: ELSIF vs ELSEIF Also, moving tests for Oracle keywords in sql_mode=DEFAULT from "parser.test" to a better place "keywords.test".
-
Alexander Barkov authored
Part 5: EXIT statement Adding optional WHEN clause: EXIT [label] [WHEN expr]
-
Alexander Barkov authored
Part 5: EXIT statement Adding unconditional EXIT statement: EXIT [ label ] Conditional EXIT statements with WHERE clause will be added in a separate patch.
-
Alexander Barkov authored
Moving similar code from sql_yacc.yy and sql_yacc_ora.yy to methods: LEX::maybe_start_compound_statement() LEX::sp_push_loop_label() LEX::sp_push_loop_empty_label() LEX::sp_pop_loop_label() LEX::sp_pop_loop_empty_label() The EXIT statement will also reuse this code.
-
Alexander Barkov authored
Moving the code from *.yy to methods: LEX::sp_change_context() LEX::sp_leave_statement() LEX::sp_iterate_statement() to reuse the same code between LEAVE and ITERATE statements. EXIT statement will also reuse the same code.
-
Alexander Barkov authored
Part 9: EXCEPTION handlers EXCEPTION is now supported in inner blocks.
-
Alexander Barkov authored
When processing an SP body: CREATE PROCEDURE p1 (parameters) AS [ declarations ] BEGIN statements [ EXCEPTION exceptions ] END; the parser generates two "jump" instructions: - from the end of "declarations" to the beginning of EXCEPTION - from the end of EXCEPTION to "statements" These jumps are useless if EXCEPTION does not exist. This patch makes sure that these two "jump" instructions are generated only if EXCEPTION really exists.
-
Alexander Barkov authored
-
Alexander Barkov authored
- Part 9: EXCEPTION handlers The top-most stored routine blocks now support EXCEPTION clause in its correct place: AS [ declarations ] BEGIN statements [ EXCEPTION exceptions ] END Inner block will be done in a separate commit. - Part 14: IN OUT instead of INOUT (in SP parameter declarations)
-
Alexander Barkov authored
Part 13: RETURN vs RETURNS in function definition: CREATE FUNCTION f1(a INT) RETURN INT ... Part 12: No parentheses if no arguments: CREATE FUNCTION f1 RETURN INT ...
-
Alexander Barkov authored
Part 12: No parentheses if no arguments Now "CREATE PROCEDURE p1 AS" is supported with no parentheses after the name. Note, "CREATE FUNCTION f1 AS" is not supported yet, due to grammar conflict with UDFs. Functions will be done in a separate patch.
-
Alexander Barkov authored
-
Alexander Barkov authored
Part 11: NULL as a statement
-
Alexander Barkov authored
Part 10: Default variable value: x INT := 10;
-
Alexander Barkov authored
Part 9: EXCEPTION handlers - Adding exception handler syntax: WHEN exception_name THEN statement - Adding EXCEPTION section intoi the top BEGIN..END SP block. Note, currently EXCEPTION goes in the beginning of the top BEGIN..END SP block. TODO: - add EXCEPTION section into inner blocks - move EXCEPTION to the end of the block
-
Alexander Barkov authored
Part 7: variable declarations
-
Alexander Barkov authored
-
Alexander Barkov authored
1. Adding const qualifiers into a few method parameters. 2. Adding methods: - sp_label::block_label_declare() - LEX::sp_block_init() - LEX::sp_block_finalize() to share more code between the files sql_yacc.yy and sql_yacc_ora.yy, as well as between the rules sp_labeled_block, sp_unlabeled_block, sp_unlabeled_block_not_atomic. 3. sql_yacc.yy, sql_yacc_ora.yy changes: - Removing sp_block_content - Reorganizing the grammar so the rules sp_labeled_block, sp_unlabeled_block, sp_unlabeled_block_not_atomic now contain both BEGIN_SYM and END keywords. Previously, BEGIN_SYM and END resided in different rules. This change makes the grammar easier to read, as well as simplifies adding Oracle-style DECLARE section (coming soon): DECLARE .. BEGIN .. END; Good side effects: - SP block related grammar does not use Lex->name any more. - The "splabel" member was removed from %union
-
Alexander Barkov authored
Adding: LEX::sp_variable_declarations_init() LEX::sp_variable_declarations_finalize() LEX::sp_handler_declaration_init() LEX::sp_handler_declaration_finalize() LEX::sp_declare_cursor() sp_context::declare_condition()
-
Alexander Barkov authored
In the affected test chunk in sp.test, sql_mode is set to 0xFFFFFFFF, which includes ORACLE, therefore an additional "AS" keyword is required: CREATE PROCEDURE p1() AS BEGIN END;
-
Alexander Barkov authored
Part 4: AS/IS keyword before a function or a procedure body
-
Alexander Barkov authored
Part6: assignment operator var:= 10;
-
Alexander Barkov authored
Part2: Different order of IN, OUT, INOUT keywords in CREATE PROCEDURE params
-
Alexander Barkov authored
Changing label syntax from "label:" to "<<label>>".
-
Alexander Barkov authored
Based on the patch by Dmitry Tolpeko.
-
Alexander Barkov authored
Reusing sp_create_assignment_lex() and sp_create_assignment_lex() in sql_yacc.yy and sql_yacc_ora.yy
-
Alexander Barkov authored
Reusing THD::parse_error() in sql_yacc.yy and sql_yacc_ora.yy
-
Alexander Barkov authored
- Adding a new grammar file sql_yacc_ora.yy, which is currently almost a full copy of sql_yacc.yy. Note, it's now assumed that sql_yacc.yy and sql_yacc_ora.yy use the same set of %token directives and exactly the same %union directive. These declarations should eventually be moved into a shared included file, to make sure that sql_yacc.h and sql_yacc_ora.h are compatible. - Removing the "-p MYSQL" flag from cmake/bison.cmake, using the %name-prefix directive inside sql_yacc.yy and sql_yacc_ora.yy instead - Adding other CMake related changes to build sql_yacc_ora.o form sql_yacc_ora.yy - Adding NUMBER(M,N) as a synonym to DECIMAL(M,N) as the first Oracle compatibility syntax understood in sql_mode=ORACLE. - Adding prototypes to functions add_virtual_expression() and handle_sql2003_note184_exception(), so they can be used in both sql_yacc.yy and sql_yacc_ora.yy. - Adding a new test suite compat/oracle, with the first test "type_number". Use this: ./mtr compat/oracle.type_number # to run a single test ./mtr --suite=compat/oracle # to run the entire new suite - Adding compat/oracle into the list of default suites, so BuildBot can run it automatically on pushes.
-
Alexander Barkov authored
-
Marko Mäkelä authored
buf_load(): When the file cannot be opened for reading, issue a note, not an error message.
-
- 04 Apr, 2017 2 commits
-
-
Sergei Petrunia authored
-
Vladislav Vaintroub authored
debug build with older cmake. The constant is implicitely defined by VS when chosen C runtime is Debug (/MTd, MDd). CMake does not define it since https://public.kitware.com/Bug/view.php?id=15777 was fixed. We remove it from compile flags, to be able to build Debug with /MT runtime using older cmakes.
-