1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.


include/my_bitmap.h:
  Bug#26827 - table->read_set is set incorrectly,
              causing update of a different column
  Added a warning comment.
sql/sql_partition.cc:
  Bug#26827 - table->read_set is set incorrectly,
              causing update of a different column
  Moved increment of pointer out of bitmap_set_bit() call.
This commit is contained in:
unknown
2007-07-05 11:31:03 +02:00
parent 435df1859f
commit 26af0b96a8
2 changed files with 13 additions and 2 deletions

View File

@ -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);