diff options
author | unknown <pem@mysql.com> | 2002-12-12 13:14:23 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2002-12-12 13:14:23 +0100 |
commit | b1b62274856c81a5f1f7a49384fc93810fd2a2bd (patch) | |
tree | 595d5056b5c8e5c0258b01e6b1a3236f595f773f /sql/sp_head.h | |
parent | 37ce17e2cd6e796ca19674fb42f91bd153aaedf2 (diff) | |
download | mariadb-git-b1b62274856c81a5f1f7a49384fc93810fd2a2bd.tar.gz |
Moved create/find/drop functions to a separate files (sp.cc,sp.h).
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).
Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.
sql/Makefile.am:
Added new sp.h/sp.cc file.
sql/item.h:
New deferred result_type() method in Item_splocal.
sql/lex.h:
Temporary fix until REPEAT conflict is solved. Use SPREPEAT for now.
sql/sp_head.cc:
Moved create/find/drop functions to sp.cc.
Fixed the backpatch stuff.
(Also removed some dead code and updated comments.)
sql/sp_head.h:
Moved create/find/drop declarations to sp.h.
Fixed the backpatch stuff.
sql/sp_pcontext.h:
New method: last_label().
sql/sql_parse.cc:
Include sp.h.
sql/sql_yacc.yy:
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, and REPEAT. (Note: SPREPEAT for now.)
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 53130bffdf1..87f2b78b9fd 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -73,10 +73,10 @@ public: restore_lex(THD *thd); void - push_backpatch(uint ip); + push_backpatch(sp_instr *i); void - backpatch(uint dest); + backpatch(); private: @@ -85,7 +85,7 @@ private: LEX *m_mylex; // My own lex LEX m_lex; // Temp. store for the other lex DYNAMIC_ARRAY m_instr; // The "instructions" - List<uint> m_backpatch; // Instructions needing backpaching + List<sp_instr> m_backpatch; // Instructions needing backpaching inline sp_instr * get_instr(uint i) @@ -100,20 +100,6 @@ private: // -// Find a stored procedure given its name. Returns NULL if not -// found. -// -sp_head * -sp_find(THD *thd, Item_string *name); - -int -sp_create_procedure(THD *thd, char *name, uint namelen, char *def, uint deflen); - -int -sp_drop(THD *thd, char *name, uint namelen); - - -// // "Instructions"... // @@ -243,7 +229,7 @@ public: m_dest= dest; } -private: +protected: int m_dest; // Where we will go @@ -272,7 +258,6 @@ public: private: - int m_dest; // Where we will go Item *m_expr; // The condition }; // class sp_instr_jump_if : public sp_instr_jump @@ -300,7 +285,6 @@ public: private: - int m_dest; // Where we will go Item *m_expr; // The condition }; // class sp_instr_jump_if_not : public sp_instr_jump |