1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
unknown
2003-04-02 20:42:28 +02:00
parent 60e7ad754f
commit 2eebaf7bd3
9 changed files with 102 additions and 72 deletions

View File

@@ -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