diff options
author | pem@mysql.com <> | 2005-11-01 15:03:41 +0100 |
---|---|---|
committer | pem@mysql.com <> | 2005-11-01 15:03:41 +0100 |
commit | c4c2dc079bf44fd1374ceb547a315bf37092b192 (patch) | |
tree | 7154dfbd2783f06db2587a7d73fd7eef907ae685 /sql/sp_pcontext.h | |
parent | f3502cd9838f75086de49478115d9a54d4a45a3d (diff) | |
parent | 4e9e038ff97f5c7a6588a42e97c18c827ed97e8c (diff) | |
download | mariadb-git-c4c2dc079bf44fd1374ceb547a315bf37092b192.tar.gz |
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/bug14376/mysql-5.0
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index bd2259cb6fb..fbeac37c058 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -164,6 +164,7 @@ class sp_pcontext : public Sql_alloc { while (num--) pop_dynamic(&m_pvar); + m_pboundary= m_pvar.elements; } // Find by name @@ -183,6 +184,14 @@ class sp_pcontext : public Sql_alloc return p; } + // Set the current scope boundary (for default values) + // The argument is the number of variables to skip. + inline void + declare_var_boundary(uint n) + { + m_pboundary= m_pvar.elements-n; + } + // // Labels // @@ -287,6 +296,13 @@ private: uint m_poffset; // Variable offset for this context uint m_coffset; // Cursor offset for this context + /* + Boundary for finding variables in this in this context. + This is normally the same as m_pvar.elements, but differs during + parsing of DECLARE ... DEFAULT, to get the scope right for DEFAULT + values. + */ + uint m_pboundary; DYNAMIC_ARRAY m_pvar; // Parameters/variables DYNAMIC_ARRAY m_cond; // Conditions |