summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-05-26 00:18:24 +0300
committerunknown <monty@mysql.com>2005-05-26 00:18:24 +0300
commit865b8917d68d806a30f1f420e23d5ed9549841e2 (patch)
treeb627cbb065f4b71892deaf1d32879fb4197c576e /sql/item.cc
parent5ec889c798aff4c0368f646162f569697d818657 (diff)
downloadmariadb-git-865b8917d68d806a30f1f420e23d5ed9549841e2.tar.gz
Move function from header file to make it easier to debug
sql/item.cc: Move function to make it easier to debug sql/item.h: Move function to make them easier to debug
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 69b1b78a961..182aef4c94c 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -297,6 +297,22 @@ longlong Item::val_int_from_decimal()
}
+void *Item::operator new(size_t size, Item *reuse, uint *rsize)
+{
+ if (reuse && size <= reuse->rsize)
+ {
+ reuse->cleanup();
+ TRASH((void *)reuse, size);
+ if (rsize)
+ (*rsize)= reuse->rsize;
+ return (void *)reuse;
+ }
+ if (rsize)
+ (*rsize)= size;
+ return (void *)sql_alloc((uint)size);
+}
+
+
Item::Item():
rsize(0), name(0), orig_name(0), name_length(0), fixed(0),
collation(&my_charset_bin, DERIVATION_COERCIBLE)