Loading sql/item_func.cc +15 −0 Original line number Diff line number Diff line Loading @@ -1691,6 +1691,13 @@ longlong Item_func_bit_count::val_int() #ifdef HAVE_DLOPEN udf_handler::~udf_handler() { /* Everything should be properly cleaned up by this moment. */ DBUG_ASSERT(not_original || !(initialized || buffers)); } void udf_handler::cleanup() { if (!not_original) { Loading @@ -1703,9 +1710,11 @@ udf_handler::~udf_handler() (*deinit)(&initid); } free_udf(u_d); initialized= FALSE; } if (buffers) // Because of bug in ecc delete [] buffers; buffers= 0; } } Loading Loading @@ -1945,6 +1954,12 @@ String *udf_handler::val_str(String *str,String *save_str) } void Item_udf_func::cleanup() { udf.cleanup(); Item_func::cleanup(); } double Item_func_udf_float::val() { Loading sql/item_func.h +1 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,7 @@ class Item_udf_func :public Item_func fixed= 1; return res; } void cleanup(); Item_result result_type () const { return udf.result_type(); } table_map not_null_tables() const { return 0; } }; Loading sql/item_sum.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1449,6 +1449,17 @@ bool Item_udf_sum::add() DBUG_RETURN(0); } void Item_udf_sum::cleanup() { /* udf_handler::cleanup() nicely handles case when we have not original item but one created by copy_or_same() method. */ udf.cleanup(); Item_sum::cleanup(); } Item *Item_sum_udf_float::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_udf_float(thd, this); Loading sql/item_sum.h +1 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,7 @@ class Item_udf_sum : public Item_sum bool add(); void reset_field() {}; void update_field() {}; void cleanup(); }; Loading sql/sql_udf.h +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ class udf_handler :public Sql_alloc bool get_arguments(); bool fix_fields(THD *thd,struct st_table_list *tlist,Item_result_field *item, uint arg_count,Item **args); void cleanup(); double val(my_bool *null_value) { if (get_arguments()) Loading Loading
sql/item_func.cc +15 −0 Original line number Diff line number Diff line Loading @@ -1691,6 +1691,13 @@ longlong Item_func_bit_count::val_int() #ifdef HAVE_DLOPEN udf_handler::~udf_handler() { /* Everything should be properly cleaned up by this moment. */ DBUG_ASSERT(not_original || !(initialized || buffers)); } void udf_handler::cleanup() { if (!not_original) { Loading @@ -1703,9 +1710,11 @@ udf_handler::~udf_handler() (*deinit)(&initid); } free_udf(u_d); initialized= FALSE; } if (buffers) // Because of bug in ecc delete [] buffers; buffers= 0; } } Loading Loading @@ -1945,6 +1954,12 @@ String *udf_handler::val_str(String *str,String *save_str) } void Item_udf_func::cleanup() { udf.cleanup(); Item_func::cleanup(); } double Item_func_udf_float::val() { Loading
sql/item_func.h +1 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,7 @@ class Item_udf_func :public Item_func fixed= 1; return res; } void cleanup(); Item_result result_type () const { return udf.result_type(); } table_map not_null_tables() const { return 0; } }; Loading
sql/item_sum.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1449,6 +1449,17 @@ bool Item_udf_sum::add() DBUG_RETURN(0); } void Item_udf_sum::cleanup() { /* udf_handler::cleanup() nicely handles case when we have not original item but one created by copy_or_same() method. */ udf.cleanup(); Item_sum::cleanup(); } Item *Item_sum_udf_float::copy_or_same(THD* thd) { return new (thd->mem_root) Item_sum_udf_float(thd, this); Loading
sql/item_sum.h +1 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,7 @@ class Item_udf_sum : public Item_sum bool add(); void reset_field() {}; void update_field() {}; void cleanup(); }; Loading
sql/sql_udf.h +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ class udf_handler :public Sql_alloc bool get_arguments(); bool fix_fields(THD *thd,struct st_table_list *tlist,Item_result_field *item, uint arg_count,Item **args); void cleanup(); double val(my_bool *null_value) { if (get_arguments()) Loading