diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-03-16 16:28:52 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:03:00 +0400 |
commit | 9dfe7bf86dd1743dc3bf33a8c09937aca9db503a (patch) | |
tree | fec18db97f751592fe62bacd19faca4d96cab23f /sql/sp_pcontext.h | |
parent | 84c55a5668db582aa92dd2ccf076fbb783894b12 (diff) | |
download | mariadb-git-9dfe7bf86dd1743dc3bf33a8c09937aca9db503a.tar.gz |
MDEV-10598 Variable declarations can go after cursor declarations
Based on a contributed patch from Jerome Brauge.
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index f6ed0ace60c..f8ca45da4ae 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -659,6 +659,15 @@ public: /// Find cursor by offset (for SHOW {PROCEDURE|FUNCTION} CODE only). const sp_pcursor *find_cursor(uint offset) const; + const sp_pcursor *get_cursor_by_local_frame_offset(uint offset) const + { return &m_cursors.at(offset); } + + uint cursor_offset() const + { return m_cursor_offset; } + + uint frame_cursor_count() const + { return m_cursors.elements(); } + uint max_cursor_index() const { return m_max_cursor_index + m_cursors.elements(); } |