diff options
author | unknown <knielsen@mysql.com> | 2006-06-30 09:26:36 +0200 |
---|---|---|
committer | unknown <knielsen@mysql.com> | 2006-06-30 09:26:36 +0200 |
commit | d9cb536a55f4fd83e66fb7d87c62924b714432f8 (patch) | |
tree | b7dbbca863e9dee3f7b5c83cfaa990c51a5a4da3 /sql/item.h | |
parent | ce5ed66f2abc0dfc3779b5e59b875f758545b29b (diff) | |
download | mariadb-git-d9cb536a55f4fd83e66fb7d87c62924b714432f8.tar.gz |
BUG#20769: Dangling pointer in ctype_recoding test case.
In some functions dealing with strings and character sets, the wrong
pointers were saved for restoration in THD::rollback_item_tree_changes().
This could potentially cause random corruption or crashes.
Fixed by passing the original Item ** locations, not local stack copies.
Also remove unnecessary use of default arguments.
sql/item.cc:
Function agg_item_charsets() now handles non-consequtive Item *'s.
sql/item.h:
Remove use of default argument.
sql/item_cmpfunc.cc:
Remove use of default argument.
sql/item_func.cc:
Remove use of default argument.
sql/item_func.h:
Function agg_item_charsets() now handles non-consequtive Item *'s.
sql/item_strfunc.cc:
Pass original Item **'s to agg_arg_charsets(), not local copies, to ensure
proper restoration in THD::rollback_item_tree_changes().
sql/item_sum.cc:
Remove use of default argument.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item.h b/sql/item.h index 2cadfda6895..534d20b3aec 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1075,12 +1075,11 @@ public: }; bool agg_item_collations(DTCollation &c, const char *name, - Item **items, uint nitems, uint flags= 0); + Item **items, uint nitems, uint flags, int item_sep); bool agg_item_collations_for_comparison(DTCollation &c, const char *name, - Item **items, uint nitems, - uint flags= 0); + Item **items, uint nitems, uint flags); bool agg_item_charsets(DTCollation &c, const char *name, - Item **items, uint nitems, uint flags= 0); + Item **items, uint nitems, uint flags, int item_sep); class Item_num: public Item |