summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-07-02 20:18:43 +0300
committerunknown <monty@mysql.com>2005-07-02 20:18:43 +0300
commitc7ab92c28a535d2419ffa906042fff7e476df972 (patch)
tree4ffe0df201e5a0c1c97ca019abdce3424f51f207
parente9cb2fb35bde0cb9e0edadcb077c2adccc44c3e4 (diff)
parent2e16838c42b873578e60a54290918998068629a4 (diff)
downloadmariadb-git-c7ab92c28a535d2419ffa906042fff7e476df972.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
-rw-r--r--sql/sql_select.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index ba14c880b65..972fb4e0368 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -8223,12 +8223,10 @@ cp_buffer_from_ref(THD *thd, TABLE_REF *ref)
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
for (store_key **copy=ref->key_copy ; *copy ; copy++)
{
- int res;
- if ((res= (*copy)->copy()))
+ if ((*copy)->copy() & 1)
{
thd->count_cuted_fields= save_count_cuted_fields;
- if ((res= res & 1))
- return res; // Something went wrong
+ return 1; // Something went wrong
}
}
thd->count_cuted_fields= save_count_cuted_fields;
@@ -8827,7 +8825,8 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param,
DBUG_RETURN(0);
err:
- delete [] param->copy_field; // This is never 0
+ if (copy)
+ delete [] param->copy_field;
param->copy_field=0;
err2:
DBUG_RETURN(TRUE);