1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-10581 sql_mode=ORACLE: Explicit cursor FOR LOOP

MDEV-12098 sql_mode=ORACLE: Implicit cursor FOR loop
This commit is contained in:
Alexander Barkov
2017-03-10 14:11:07 +04:00
parent f429b5a834
commit 84c55a5668
13 changed files with 1411 additions and 40 deletions

View File

@ -674,22 +674,37 @@ public:
};
struct Lex_for_loop_bounds_st
{
public:
class sp_assignment_lex *m_index;
class sp_assignment_lex *m_upper_bound;
int8 m_direction;
bool m_implicit_cursor;
bool is_for_loop_cursor() const { return m_upper_bound == NULL; }
};
struct Lex_for_loop_st
{
public:
class sp_variable *m_index;
class sp_variable *m_upper_bound;
int m_direction;
int m_cursor_offset;
int8 m_direction;
bool m_implicit_cursor;
void init()
{
m_index= 0;
m_upper_bound= 0;
m_direction= 0;
m_implicit_cursor= false;
}
void init(const Lex_for_loop_st &other)
{
*this= other;
}
bool is_for_loop_cursor() const { return m_upper_bound == NULL; }
};