summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2004-11-25 13:33:31 +0000
committertomas@poseidon.ndb.mysql.com <>2004-11-25 13:33:31 +0000
commit538a3f7a53ad24e374b2ff979da6255261ecbb90 (patch)
treee75ee46033a15986e69f6355f4f36ed7aadcdb5c /sql/item_func.cc
parentd472a62475c60be39bf9c60eafd11aa49cea55cf (diff)
parent886d54bb370cfd3809636560aac5a541a0a2c46e (diff)
downloadmariadb-git-538a3f7a53ad24e374b2ff979da6255261ecbb90.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 269bd38ffa6..01866a786a6 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1684,18 +1684,21 @@ longlong Item_func_bit_count::val_int()
udf_handler::~udf_handler()
{
- if (initialized)
+ if (!not_original)
{
- if (u_d->func_deinit != NULL)
+ if (initialized)
{
- void (*deinit)(UDF_INIT *) = (void (*)(UDF_INIT*))
- u_d->func_deinit;
- (*deinit)(&initid);
+ if (u_d->func_deinit != NULL)
+ {
+ void (*deinit)(UDF_INIT *) = (void (*)(UDF_INIT*))
+ u_d->func_deinit;
+ (*deinit)(&initid);
+ }
+ free_udf(u_d);
}
- free_udf(u_d);
+ if (buffers) // Because of bug in ecc
+ delete [] buffers;
}
- if (buffers) // Because of bug in ecc
- delete [] buffers;
}