summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-13 11:07:39 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-13 11:07:39 +0300
commit790852c0c91df8bf104687753c019ceefaed6622 (patch)
tree9250c6ecbf2e3230d840b116a29593ca6bdd9fe5 /sql/item_sum.cc
parent8b25c0e4dc6cb18de7ce4be25eb49c44eeab35cf (diff)
downloadmariadb-git-790852c0c91df8bf104687753c019ceefaed6622.tar.gz
Bug #55580 : segfault in read_view_sees_trx_id
The server was not checking for errors generated during the execution of Item::val_xxx() methods when copying data to the group, order, or distinct temp table's row. Fixed by extending the copy_funcs() to return an error code and by checking for that error code on the places copy_funcs() is called. Test case added.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 228e36fc9f9..f92bde9ce87 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -2556,7 +2556,8 @@ bool Item_sum_count_distinct::add()
if (always_null)
return 0;
copy_fields(tmp_table_param);
- copy_funcs(tmp_table_param->items_to_copy);
+ if (copy_funcs(tmp_table_param->items_to_copy, table->in_use))
+ return TRUE;
for (Field **field=table->field ; *field ; field++)
if ((*field)->is_real_null(0))
@@ -3128,7 +3129,8 @@ bool Item_func_group_concat::add()
if (always_null)
return 0;
copy_fields(tmp_table_param);
- copy_funcs(tmp_table_param->items_to_copy);
+ if (copy_funcs(tmp_table_param->items_to_copy, table->in_use))
+ return TRUE;
for (uint i= 0; i < arg_count_field; i++)
{