Below is the list of changes that have just been committed into a local
4.1 repository of igor. When igor does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2516 06/06/22 15:50:15 igor@stripped +3 -0
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.
sql/item_sum.cc
1.148 06/06/22 15:50:11 igor@stripped +0 -1
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/t/ctype_ucs.test
1.30 06/06/22 15:50:11 igor@stripped +12 -0
Added a test case for bug #20076.
mysql-test/r/ctype_ucs.result
1.30 06/06/22 15:50:11 igor@stripped +7 -0
Added a test case for bug #20076.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: igor
# Host: rurik.mysql.com
# Root: /home/igor/mysql-4.1-opt
--- 1.147/sql/item_sum.cc 2006-03-29 11:25:19 -08:00
+++ 1.148/sql/item_sum.cc 2006-06-22 15:50:11 -07:00
@@ -930,7 +930,6 @@
if (!args[0]->null_value)
{
- res_str->strip_sp();
result_field->val_str(&tmp_value);
if (result_field->is_null() ||
--- 1.29/mysql-test/r/ctype_ucs.result 2006-04-12 22:55:41 -07:00
+++ 1.30/mysql-test/r/ctype_ucs.result 2006-06-22 15:50:11 -07:00
@@ -715,3 +715,10 @@
river
drop table t1;
deallocate prepare stmt;
+CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci);
+INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
+SELECT id, MIN(s) FROM t1 GROUP BY id;
+id MIN(s)
+1 ZZZ
+2 ZZZ
+DROP TABLE t1;
--- 1.29/mysql-test/t/ctype_ucs.test 2006-04-12 22:55:41 -07:00
+++ 1.30/mysql-test/t/ctype_ucs.test 2006-06-22 15:50:11 -07:00
@@ -451,4 +451,16 @@
select utext from t1 where utext like '%%';
drop table t1;
deallocate prepare stmt;
+
+#
+# Bug #20076: server crashes for a query with GROUP BY if MIN/MAX aggregation
+# over a 'ucs2' field uses a temporary table
+#
+
+CREATE TABLE t1 (id int, s char(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci);
+INSERT INTO t1 VALUES (1, 'ZZZZZ'), (1, 'ZZZ'), (2, 'ZZZ'), (2, 'ZZZZZ');
+
+SELECT id, MIN(s) FROM t1 GROUP BY id;
+
+DROP TABLE t1;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (igor:1.2516) BUG#20076 | igor | 23 Jun |