diff options
author | unknown <igor@rurik.mysql.com> | 2005-08-02 13:12:41 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-08-02 13:12:41 -0700 |
commit | bcaff83722efd083d4ccba37fe7b35cb4464b0f8 (patch) | |
tree | a16aee171aaff54410b8ec2c536b1e94a51ad4cf /sql/item_sum.cc | |
parent | c2b83502f9eac1ac06049aacbf68a70c342f2b27 (diff) | |
download | mariadb-git-bcaff83722efd083d4ccba37fe7b35cb4464b0f8.tar.gz |
item_sum.cc:
Reversed the changes to fix bug #12095 after review
done by SergeyG. Applied a fix suggested by him.
Added my comment.
sql/item_sum.cc:
Reversed the changes to fix bug #12095 after review
done by SergeyG. Applied a fix suggested by him.
Added my comment.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 1ee48dfb763..74a7fee113e 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1577,7 +1577,11 @@ int group_concat_key_cmp_with_distinct(void* arg, byte* key1, the temporary table, not the original field */ Field *field= (*field_item)->get_tmp_table_field(); - if (field) + /* + If field_item is a const item then either get_tp_table_field returns 0 + or it is an item over a const table. + */ + if (field && !(*field_item)->const_item()) { int res; uint offset= field->offset(); @@ -1610,7 +1614,11 @@ int group_concat_key_cmp_with_order(void* arg, byte* key1, byte* key2) the temporary table, not the original field */ Field *field= item->get_tmp_table_field(); - if (field) + /* + If item is a const item then either get_tp_table_field returns 0 + or it is an item over a const table. + */ + if (field && !item->const_item()) { int res; uint offset= field->offset(); @@ -1986,7 +1994,6 @@ bool Item_func_group_concat::setup(THD *thd) } count_field_types(tmp_table_param,all_fields,0); - tmp_table_param->need_const= 1; if (table) { /* |