diff options
author | monty@mashka.mysql.fi <> | 2003-11-19 17:31:57 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-11-19 17:31:57 +0200 |
commit | 0bd17351ca478557f2888bf70ad7e0e088e8011d (patch) | |
tree | 443115763c8883fe2cec46dd174648a1c25aeedf /sql/item_cmpfunc.h | |
parent | a47d56088f15618158701c7d480c54551ae89603 (diff) | |
download | mariadb-git-0bd17351ca478557f2888bf70ad7e0e088e8011d.tar.gz |
Changed mysql_next_result() to return int instead of bool
Changed ~Item_func_in() to call cleanup() (to fix memory leak)
Fixed test_multi_statements() test in client_test
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index dac7a2d43eb..51c53e6c136 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -638,17 +638,7 @@ class cmp_item_row :public cmp_item uint n; public: cmp_item_row(): comparators(0), n(0) {} - ~cmp_item_row() - { - if (comparators) - { - for (uint i= 0; i < n; i++) - { - if (comparators[i]) - delete comparators[i]; - } - } - } + ~cmp_item_row(); void store_value(Item *item); int cmp(Item *arg); int compare(cmp_item *arg); @@ -694,7 +684,7 @@ public: cmp_item_string *cmp= (cmp_item_string *)c; return sortcmp(value_res, cmp->value_res, cmp_charset); } - cmp_item * make_same() + cmp_item *make_same() { return new cmp_item_sort_string_in_static(cmp_charset); } @@ -715,7 +705,10 @@ class Item_func_in :public Item_int_func } longlong val_int(); void fix_length_and_dec(); - ~Item_func_in() {} + ~Item_func_in() + { + cleanup(); /* This is not called by Item::~Item() */ + } void cleanup() { delete array; |