summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-11-23 01:28:32 +0200
committerunknown <bell@sanja.is.com.ua>2005-11-23 01:28:32 +0200
commitaa06123f83d764c94f52bb7d53673ea98fcc8c42 (patch)
treeace720b23945432863b582bf907eecdaa87fc638 /sql/sp_head.h
parenta2c26aa7109182ede0ad1d06f53b46cc3b41e2c2 (diff)
parent164ce4c5cd8b18c6fe8f376ae7475622ce1cdb09 (diff)
downloadmariadb-git-aa06123f83d764c94f52bb7d53673ea98fcc8c42.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug7-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0 mysql-test/r/sp-error.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/t/sp-error.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item_func.cc: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/sp.result: merge sql/share/errmsg.txt: merge
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 9addec706e7..6334bca0fc6 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -143,6 +143,32 @@ public:
LEX_STRING m_definer_host;
longlong m_created;
longlong m_modified;
+ /* Recursion level of the current SP instance. The levels are numbered from 0 */
+ ulong m_recursion_level;
+ /*
+ A list of diferent recursion level instances for the same procedure.
+ For every recursion level we have a sp_head instance. This instances
+ connected in the list. The list ordered by increasing recursion level
+ (m_recursion_level).
+ */
+ sp_head *m_next_cached_sp;
+ /*
+ Pointer to the first element of the above list
+ */
+ sp_head *m_first_instance;
+ /*
+ Pointer to the first free (non-INVOKED) routine in the list of
+ cached instances for this SP. This pointer is set only for the first
+ SP in the list of instences (see above m_first_cached_sp pointer).
+ The pointer equal to 0 if we have no free instances.
+ For non-first instance value of this pointer meanless (point to itself);
+ */
+ sp_head *m_first_free_instance;
+ /*
+ Pointer to the last element in the list of instances of the SP.
+ For non-first instance value of this pointer meanless (point to itself);
+ */
+ sp_head *m_last_cached_sp;
/*
Set containing names of stored routines used by this routine.
Note that unlike elements of similar set for statement elements of this
@@ -266,6 +292,8 @@ public:
void optimize();
void opt_mark(uint ip);
+ void recursion_level_error();
+
inline sp_instr *
get_instr(uint i)
{