From 5ac6264dd6494d3d0af067eb0813c3e8236e1a66 Mon Sep 17 00:00:00 2001 From: "istruewing@chilla.local" <> Date: Thu, 5 Jul 2007 11:31:03 +0200 Subject: Bug#26827 - table->read_set is set incorrectly, causing update of a different column Post-pushbuild fix. bitmap_set_bit() is an inline function in DEBUG builds and a macro in non-DEBUG builds. The latter evaluates its 'bit' argument twice. So one must not use increment/decrement operators on this argument. Moved increment of pointer out of bitmap_set_bit() call. --- sql/sql_partition.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/sql_partition.cc') diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index a44af968d9f..191859e0ed4 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -606,8 +606,8 @@ static bool create_full_part_field_array(THD *thd, TABLE *table, partitioning. */ if ((ptr= part_info->full_part_field_array)) - while (*ptr) - bitmap_set_bit(&part_info->full_part_field_set, (*ptr++)->field_index); + for (; *ptr; ptr++) + bitmap_set_bit(&part_info->full_part_field_set, (*ptr)->field_index); end: DBUG_RETURN(result); -- cgit v1.2.1