summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2003-04-02 20:42:28 +0200
committerunknown <pem@mysql.com>2003-04-02 20:42:28 +0200
commit2eebaf7bd364ec449c220160e6ff3d59461d13a3 (patch)
tree9fcfdb116729ea80bfec3c92c22a63e896243b06 /sql/sp_head.h
parent60e7ad754f2f0467a9419c50714f43f4701f88f2 (diff)
downloadmariadb-git-2eebaf7bd364ec449c220160e6ff3d59461d13a3.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). mysql-test/r/sp.result: Drop db before creating. mysql-test/t/sp.test: Drop db before creating.
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