From 8fd14af83afbd3bdf6886c3c9e4ecb8541842674 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jan 2006 21:44:42 -0800 Subject: [PATCH 1/2] Ajustement after merge --- sql/sql_select.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4619f7134f0..c282a5bd42c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -365,7 +365,8 @@ JOIN::prepare(Item ***rref_pointer_array, if (having_fix_rc || thd->net.report_error) DBUG_RETURN(-1); /* purecov: inspected */ if (having->with_sum_func) - having->split_sum_func2(thd, ref_pointer_array, all_fields, &having); + having->split_sum_func2(thd, ref_pointer_array, all_fields, + &having, TRUE); thd->lex->allow_sum_func= save_allow_sum_func; } if (select_lex->inner_sum_func_list) From a89284bad1c5bb911eab4d5d1539ae8bb963ed1c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jan 2006 14:55:39 +0100 Subject: [PATCH 2/2] Fix mysqltest crash problem client/mysqltest.c: Revert to original version of copying name and value into var in var_init --- client/mysqltest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index dbb910c2e3d..c6bc9edd453 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -4216,10 +4216,12 @@ static VAR *var_init(VAR *v, const char *name, int name_len, const char *val, if (!(tmp_var->str_val = my_malloc(val_alloc_len+1, MYF(MY_WME)))) die("Out of memory"); - if (name) - strmake(tmp_var->name, name, name_len); + memcpy(tmp_var->name, name, name_len); if (val) - strmake(tmp_var->str_val, val, val_len); + { + memcpy(tmp_var->str_val, val, val_len); + tmp_var->str_val[val_len]= 0; + } tmp_var->name_len = name_len; tmp_var->str_val_len = val_len; tmp_var->alloced_len = val_alloc_len;