diff options
author | pem@mysql.com <> | 2002-12-11 14:24:29 +0100 |
---|---|---|
committer | pem@mysql.com <> | 2002-12-11 14:24:29 +0100 |
commit | f0137bcd686fbfe51fadb681713f61e0559c84da (patch) | |
tree | c0a89d8aee02a69b9c85212ad22f3f7a5e31ca64 /sql/sp_pcontext.h | |
parent | aae07a4d45989b1b2a57ee01002e4a101511b512 (diff) | |
download | mariadb-git-f0137bcd686fbfe51fadb681713f61e0559c84da.tar.gz |
Fixed bugs in the parameter evaluation and modified the execution engine
for better jump support. Some flow control support added too (but not
complete).
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 956b8d99d4d..8a37adcf427 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -38,6 +38,12 @@ typedef struct my_bool isset; } sp_pvar_t; +typedef struct +{ + char *name; + uint ip; // Instruction index +} sp_label_t; + class sp_pcontext : public Sql_alloc { sp_pcontext(const sp_pcontext &); /* Prevent use of these */ @@ -89,6 +95,7 @@ class sp_pcontext : public Sql_alloc void push(LEX_STRING *name, enum enum_field_types type, sp_param_mode_t mode); + // Pop the last 'num' slots of the frame inline void pop(uint num = 1) { @@ -109,6 +116,21 @@ class sp_pcontext : public Sql_alloc return m_pvar+i; } + void + push_label(char *name, uint ip); + + void + push_gen_label(uint ip); + + sp_label_t * + find_label(char *name); + + inline void + pop_label() + { + m_label.pop(); + } + private: uint m_params; // The number of parameters @@ -121,6 +143,9 @@ private: void grow(); + List<sp_label_t> m_label; // The label list + uint m_genlab; // Gen. label counter + }; // class sp_pcontext : public Sql_alloc |