diff options
author | aelkin/elkin@koti.dsl.inet.fi <> | 2007-12-12 12:14:59 +0200 |
---|---|---|
committer | aelkin/elkin@koti.dsl.inet.fi <> | 2007-12-12 12:14:59 +0200 |
commit | d8d6db6f78f115900167b7ded5ed84fa6f1d806b (patch) | |
tree | 84a421ca8e0f200a6b9023670d25f4572cf6a40d /include/my_bitmap.h | |
parent | cf56c586b7406ec0a9d26bc4c3b39585acc7b22e (diff) | |
download | mariadb-git-d8d6db6f78f115900167b7ded5ed84fa6f1d806b.tar.gz |
Bug#31552 Replication breaks when deleting rows from out-of-sync table
without PK
Bug#31609 Not all RBR slave errors reported as errors
bug#32468 delete rows event on a table with foreign key constraint fails
The first two bugs comprise idempotency issues.
First, there was no error code reported under conditions of the bug
description although the slave sql thread halted.
Second, executions were different with and without presence of prim key in
the table.
Third, there was no way to instruct the slave whether to ignore an error
and skip to the following event or to halt.
Fourth, there are handler errors which might happen due to idempotent
applying of binlog but those were not listed among the "idempotent" error
list.
All the named issues are addressed.
Wrt to the 3rd, there is the new global system variable, changeble at run
time, which controls the slave sql thread behaviour.
The new variable allows further extensions to mimic the sql_mode
session/global variable.
To address the 4th, the new bug#32468 had to be fixed as it was staying
in the way.
Diffstat (limited to 'include/my_bitmap.h')
-rw-r--r-- | include/my_bitmap.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/my_bitmap.h b/include/my_bitmap.h index ab69b2d671d..78642df3362 100644 --- a/include/my_bitmap.h +++ b/include/my_bitmap.h @@ -159,6 +159,22 @@ static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2) #define bitmap_set_all(MAP) \ (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP)))) +/** + check, set and clear a bit of interest of an integer. + + If the bit is out of range @retval -1. Otherwise + bit_is_set @return 0 or 1 reflecting the bit is set or not; + bit_do_set @return 1 (bit is set 1) + bit_do_clear @return 0 (bit is cleared to 0) +*/ + +#define bit_is_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ + (((I) & (ULL(1) << (B))) == 0 ? 0 : 1) : -1) +#define bit_do_set(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ + ((I) |= (ULL(1) << (B)), 1) : -1) +#define bit_do_clear(I,B) (sizeof(I) * CHAR_BIT > (B) ? \ + ((I) &= ~(ULL(1) << (B)), 0) : -1) + #ifdef __cplusplus } #endif |