diff options
author | unknown <pem@mysql.comhem.se> | 2005-04-08 19:58:04 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2005-04-08 19:58:04 +0200 |
commit | fc5db9351610fed5405df1e26a0e7623d27c5f4d (patch) | |
tree | 2e1f1768da174abb00e496a1480fadbefb4e6303 /sql/sp_pcontext.h | |
parent | 452794235c8ff9f70f20813031a4ce77df6e4d3b (diff) | |
download | mariadb-git-fc5db9351610fed5405df1e26a0e7623d27c5f4d.tar.gz |
Fixed BUG#9073: Able to declare two handlers for same condition in same scope
mysql-test/r/sp-error.result:
Added test case for BUG#9073.
mysql-test/t/sp-error.test:
Added test case for BUG#9073.
sql/share/errmsg.txt:
New error message for duplicate condition handlers in stored procedures.
sql/sp_pcontext.cc:
Keep track on condition handlers in the same block for error checking.
sql/sp_pcontext.h:
Keep track on condition handlers in the same block for error checking.
sql/sql_yacc.yy:
Keep track on condition handlers in the same block for error checking.
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 42d8140b78c..dbce191975a 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -241,6 +241,15 @@ class sp_pcontext : public Sql_alloc m_handlers+= 1; } + inline void + push_handler(sp_cond_type_t *cond) + { + insert_dynamic(&m_handler, (gptr)&cond); + } + + bool + find_handler(sp_cond_type *cond); + inline uint max_handlers() { @@ -293,6 +302,7 @@ private: DYNAMIC_ARRAY m_pvar; // Parameters/variables DYNAMIC_ARRAY m_cond; // Conditions DYNAMIC_ARRAY m_cursor; // Cursors + DYNAMIC_ARRAY m_handler; // Handlers, for checking of duplicates List<sp_label_t> m_label; // The label list |