summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorpem@mysql.com <>2003-04-02 20:42:28 +0200
committerpem@mysql.com <>2003-04-02 20:42:28 +0200
commitc673fcb813cace451070bd08e3670329a1c31c62 (patch)
tree9fcfdb116729ea80bfec3c92c22a63e896243b06 /sql/sp_head.h
parent5eaa59541eb23930a22bd73aac40fba587300135 (diff)
downloadmariadb-git-c673fcb813cace451070bd08e3670329a1c31c62.tar.gz
Getting rid of lots of memory leaks (but not quite all of them yet,
some will go away when temporary code is replaced).
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 52cbdc56093..840276681a5 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -52,21 +52,15 @@ public:
List<char *> m_tables; // Used tables.
#endif
- static void *operator new(size_t size)
- {
- return (void*) sql_alloc((uint) size);
- }
-
- static void operator delete(void *ptr, size_t size)
- {
- /* Empty */
- }
-
sp_head(LEX_STRING *name, LEX *lex);
int
create(THD *thd);
+ // Free memory
+ void
+ destroy();
+
int
execute_function(THD *thd, Item **args, uint argcount, Item **resp);
@@ -134,11 +128,13 @@ private:
inline sp_instr *
get_instr(uint i)
{
- sp_instr *in= NULL;
+ sp_instr *ip;
if (i < m_instr.elements)
- get_dynamic(&m_instr, (gptr)&in, i);
- return in;
+ get_dynamic(&m_instr, (gptr)&ip, i);
+ else
+ ip= NULL;
+ return ip;
}
int