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.2319 05/06/28 03:18:37 igor@stripped +3 -0
group_by.result, group_by.test:
Added a test case for bug #11414.
sql_select.cc:
Fixed bug #11414: crash on Windows with some simple
GROUP BY queries.
It happened to an allocation of an array containing
0 Copy_field elements in setup_copy_fields.
The bug had been already fixed in 5.0.
mysql-test/r/group_by.result
1.50 05/06/28 03:17:15 igor@stripped +6 -0
Added a test case for bug #11414.
mysql-test/t/group_by.test
1.40 05/06/28 03:16:45 igor@stripped +12 -0
Added a test case for bug #11414.
sql/sql_select.cc
1.415 05/06/28 03:13:43 igor@stripped +3 -2
Fixed bug #11414: crash on Windows with some simple
GROUP BY queries.
It happened to an allocation of an array containing
0 Copy_field elements in setup_copy_fields.
The bug had been already fixed in 5.0.
# 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/dev/mysql-4.1-0
--- 1.414/sql/sql_select.cc Thu Jun 23 06:12:12 2005
+++ 1.415/sql/sql_select.cc Tue Jun 28 03:13:43 2005
@@ -8727,7 +8727,7 @@
{
Item *pos;
List_iterator_fast<Item> li(all_fields);
- Copy_field *copy;
+ Copy_field *copy= NULL;
res_selected_fields.empty();
res_all_fields.empty();
List_iterator_fast<Item> itr(res_all_fields);
@@ -8735,7 +8735,8 @@
uint i, border= all_fields.elements - elements;
DBUG_ENTER("setup_copy_fields");
- if (!(copy=param->copy_field= new Copy_field[param->field_count]))
+ if (param->field_count &&
+ !(copy=param->copy_field= new Copy_field[param->field_count]))
goto err2;
param->copy_funcs.empty();
--- 1.49/mysql-test/r/group_by.result Tue Jun 21 04:21:51 2005
+++ 1.50/mysql-test/r/group_by.result Tue Jun 28 03:17:15 2005
@@ -751,3 +751,9 @@
1 NULL
1 a problem
DROP TABLE t1, t2;
+CREATE TABLE t1 (n int);
+INSERT INTO t1 VALUES (1);
+SELECT n+1 AS n FROM t1 GROUP BY n;
+n
+2
+DROP TABLE t1;
--- 1.39/mysql-test/t/group_by.test Tue Jun 21 04:21:19 2005
+++ 1.40/mysql-test/t/group_by.test Tue Jun 28 03:16:45 2005
@@ -580,3 +580,15 @@
FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY err_comment;
DROP TABLE t1, t2;
+
+#
+# Test for bug #11414: crash on Windows for a simple GROUP BY query
+#
+
+CREATE TABLE t1 (n int);
+INSERT INTO t1 VALUES (1);
+
+SELECT n+1 AS n FROM t1 GROUP BY n;
+
+DROP TABLE t1;
+
| Thread |
|---|
| • bk commit into 4.1 tree (igor:1.2319) BUG#11414 | igor | 28 Jun |