From: Date: July 5 2007 11:43am Subject: bk commit into 6.0-falcon tree (istruewing:1.2585) BUG#26827 List-Archive: http://lists.mysql.com/commits/30356 X-Bug: 26827 Message-Id: Below is the list of changes that have just been committed into a local 6.0-falcon repository of istruewing. When istruewing does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-07-05 11:42:42+02:00, istruewing@stripped +2 -0 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@stripped, 2007-07-05 11:42:35+02:00, istruewing@stripped +11 -0 Bug#26827 - table->read_set is set incorrectly, causing update of a different column Added a warning comment. sql/sql_partition.cc@stripped, 2007-07-05 11:42:35+02:00, istruewing@stripped +2 -2 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 is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: istruewing # Host: chilla.local # Root: /home/mydev/mysql-5.1-falcon-bug26827 --- 1.24/include/my_bitmap.h 2007-07-05 11:43:06 +02:00 +++ 1.25/include/my_bitmap.h 2007-07-05 11:43:06 +02:00 @@ -103,6 +103,17 @@ extern void bitmap_lock_invert(MY_BITMAP &= ~ (1 << ((BIT) & 7))) #define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \ & (1 << ((BIT) & 7))) +/* + WARNING! + + The below symbols are inline functions in DEBUG builds and macros in + non-DEBUG builds. The latter evaluate their 'bit' argument twice. + + NEVER use an increment/decrement operator with the 'bit' argument. + It would work with DEBUG builds, but fails later in production builds! + + FORBIDDEN: bitmap_set_bit($my_bitmap, (field++)->field_index); +*/ #ifndef DBUG_OFF static inline void bitmap_set_bit(MY_BITMAP *map,uint bit) --- 1.108/sql/sql_partition.cc 2007-07-05 11:43:06 +02:00 +++ 1.109/sql/sql_partition.cc 2007-07-05 11:43:06 +02:00 @@ -606,8 +606,8 @@ static bool create_full_part_field_array 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);