diff options
author | istruewing@chilla.local <> | 2007-07-05 11:31:03 +0200 |
---|---|---|
committer | istruewing@chilla.local <> | 2007-07-05 11:31:03 +0200 |
commit | 5ac6264dd6494d3d0af067eb0813c3e8236e1a66 (patch) | |
tree | 5f0412e0571ab2361bc8c45e8ce6805f3bf5b4e2 /include | |
parent | dc82068c9696f7da81c60b167b8a68d2c91d8bdb (diff) | |
download | mariadb-git-5ac6264dd6494d3d0af067eb0813c3e8236e1a66.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_bitmap.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h index 488c41ffb22..0b12172946a 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -103,6 +103,17 @@ extern void bitmap_lock_invert(MY_BITMAP *map); &= ~ (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) |