summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-06-22 15:50:15 -0700
committerunknown <igor@rurik.mysql.com>2006-06-22 15:50:15 -0700
commite8adb499107c182ad5737cda5b726f8d8e924ecf (patch)
treed3256f474eda7be7d8ab47f17d7c42b13da657ba /sql/item_sum.cc
parentaf3c76631cfbc506478483c0d6a5e54fc091af09 (diff)
downloadmariadb-git-e8adb499107c182ad5737cda5b726f8d8e924ecf.tar.gz
Fixed bug #20076.
Server crashed in some cases when a query required a MIN/MAX agrregation for a 'ucs2' field. In these cases the aggregation caused calls of the function update_tmptable_sum_func that indirectly invoked the method Item_sum_hybrid::min_max_update_str_field() containing a call to strip_sp for a ucs2 character set. The latter led directly to the crash as it used my_isspace undefined for the ucs2 character set. Actually the call of strip_sp is not needed at all in this situation and has been removed by the fix. mysql-test/r/ctype_ucs.result: Added a test case for bug #20076. mysql-test/t/ctype_ucs.test: Added a test case for bug #20076.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 4b522cf06fa..0b9b10d05d4 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -930,7 +930,6 @@ Item_sum_hybrid::min_max_update_str_field()
if (!args[0]->null_value)
{
- res_str->strip_sp();
result_field->val_str(&tmp_value);
if (result_field->is_null() ||