diff options
author | unknown <igor@rurik.mysql.com> | 2005-06-28 03:18:37 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-06-28 03:18:37 -0700 |
commit | 67abd491a1d5c631b0e72ea89941fafd9ac2fa34 (patch) | |
tree | c1899479c73a735ab5131308b58c7bcdff55f57e /sql | |
parent | 3f499c32d44005906ad08c34011fbe96c598230a (diff) | |
download | mariadb-git-67abd491a1d5c631b0e72ea89941fafd9ac2fa34.tar.gz |
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.
sql/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/t/group_by.test:
Added a test case for bug #11414.
mysql-test/r/group_by.result:
Added a test case for bug #11414.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2f165565ce1..f2db5adfdda 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8727,7 +8727,7 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, { 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 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, 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(); |