diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-08-24 12:30:27 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:47 +0400 |
commit | 442ea81ed37768d50bdaed70380d8c2ad53f6949 (patch) | |
tree | cbb949bf70f32e1bc83c422d75cc26be277d7fba /sql/sp_pcontext.h | |
parent | 2ea63492f7e755031f058d530d680704160f32d1 (diff) | |
download | mariadb-git-442ea81ed37768d50bdaed70380d8c2ad53f6949.tar.gz |
MDEV-10411 Providing compatibility for basic PL/SQL constructs
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.
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 6cbd98e89a8..877e43e96c0 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -268,6 +268,12 @@ public: HANDLER_SCOPE }; + class Lex_for_loop: public Lex_for_loop_st + { + public: + Lex_for_loop() { init(); } + }; + public: sp_pcontext(); ~sp_pcontext(); @@ -513,6 +519,15 @@ public: uint current_cursor_count() const { return m_cursor_offset + m_cursors.elements(); } + void set_for_loop(const Lex_for_loop_st &for_loop) + { + m_for_loop.init(for_loop); + } + const Lex_for_loop_st &for_loop() + { + return m_for_loop; + } + private: /// Constructor for a tree node. /// @param prev the parent parsing context @@ -583,6 +598,9 @@ private: /// Scope of this parsing context. enum_scope m_scope; + + /// FOR LOOP characteristics + Lex_for_loop m_for_loop; }; // class sp_pcontext : public Sql_alloc |