summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-08-16 08:17:29 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-10 22:27:37 +0200
commit624888b4e63ca73daec2674be32ba088175a5a53 (patch)
tree6e513d15890ec2119fdab841ae0cfccaef5b1876
parent43d1f0b6b918df8d0aa31800caec4bceb1c3426d (diff)
downloadmariadb-git-624888b4e63ca73daec2674be32ba088175a5a53.tar.gz
cleanup: inherit from Sql_alloc
instead of copy-pasting its methods into a new class
-rw-r--r--sql/sql_lex.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index e17a41a9877..5e9c7b9dc6a 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -2887,20 +2887,8 @@ public:
};
-struct st_lex_local: public LEX
+struct st_lex_local: public LEX, public Sql_alloc
{
- static void *operator new(size_t size) throw()
- {
- return sql_alloc(size);
- }
- static void *operator new(size_t size, MEM_ROOT *mem_root) throw()
- {
- return (void*) alloc_root(mem_root, (uint) size);
- }
- static void operator delete(void *ptr,size_t size)
- { TRASH(ptr, size); }
- static void operator delete(void *ptr, MEM_ROOT *mem_root)
- { /* Never called */ }
};
extern void lex_init(void);