diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-08-24 07:39:04 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:46 +0400 |
commit | c570636ba278e935701ca917af966630d38556ab (patch) | |
tree | 856f9cccf65da0ffae4b70def8452fcf25f23182 /sql/sql_lex.h | |
parent | 71a0a12e61818d68201dfc985a64b58c19cfef44 (diff) | |
download | mariadb-git-c570636ba278e935701ca917af966630d38556ab.tar.gz |
MDEV-10580 sql_mode=ORACLE: FOR loop statement
Adding non-labeled FOR LOOP statement.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 041a0c8f130..0d834c2e1d3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -2633,6 +2633,10 @@ private: bool sp_change_context(THD *thd, const sp_pcontext *ctx, bool exclusive); bool sp_exit_block(THD *thd, sp_label *lab); bool sp_exit_block(THD *thd, sp_label *lab, Item *when); + + bool sp_for_loop_condition(THD *thd, const Lex_for_loop_st &loop); + bool sp_for_loop_increment(THD *thd, const Lex_for_loop_st &loop); + public: inline bool is_arena_for_set_stmt() {return arena_for_set_stmt != 0;} bool set_arena_for_set_stmt(Query_arena *backup); @@ -3167,6 +3171,16 @@ public: bool sp_while_loop_expression(THD *thd, Item *expr); bool sp_while_loop_finalize(THD *thd); + sp_variable *sp_add_for_loop_variable(THD *thd, const LEX_STRING name, + Item *value); + sp_variable *sp_add_for_loop_upper_bound(THD *thd, Item *value) + { + LEX_STRING name= { C_STRING_WITH_LEN("[upper_bound]") }; + return sp_add_for_loop_variable(thd, name, value); + } + bool sp_for_loop_index_and_bounds(THD *thd, const Lex_for_loop_st &loop); + bool sp_for_loop_finalize(THD *thd, const Lex_for_loop_st &loop); + // Check if "KEY IF NOT EXISTS name" used outside of ALTER context bool check_add_key(DDL_options_st ddl) { |