diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-08-04 23:42:44 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-08-04 23:42:44 +0200 |
commit | fa51f70dc68fe2f3afe943e2c81fcbdb34f16cad (patch) | |
tree | 6a95c5a13622b6505e09b07a78a249d29f67897d /sql/item_sum.cc | |
parent | 877de3af28b49029be1f6191f202f8e0b4fb1733 (diff) | |
download | mariadb-git-fa51f70dc68fe2f3afe943e2c81fcbdb34f16cad.tar.gz |
correct the NULL-pointer testmariadb-5.5.45
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 9000289fd33..adf48f6feec 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3518,9 +3518,10 @@ bool Item_func_group_concat::setup(THD *thd) { uint n_elems= arg_count_order + all_fields.elements; ref_pointer_array= static_cast<Item**>(thd->alloc(sizeof(Item*) * n_elems)); + if (!ref_pointer_array) + DBUG_RETURN(TRUE); memcpy(ref_pointer_array, args, arg_count * sizeof(Item*)); - if (!ref_pointer_array || - setup_order(thd, ref_pointer_array, context->table_list, list, + if (setup_order(thd, ref_pointer_array, context->table_list, list, all_fields, *order)) DBUG_RETURN(TRUE); } |