mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
A fix (bug #10179: error in default value setting).
include/my_handler.h: A fix (bug #10179: error in default value setting). Proper masks added: we should not touch extra bits. sql/key.cc: A fix (bug #10179: error in default value setting). Unnecessary code removed. sql/unireg.cc: A fix (bug #10179: error in default value setting). 1. we should take into account uneven bits (for bit fields) stored among NULL bits. 2. changed code which sets NULL bits for fields. 3. changed code which sets unused bits after NULL bits. 4. unused variables removed. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
@ -72,10 +72,11 @@ typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
|
||||
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
|
||||
{ \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ((1 << (bit_ofs)) - 1)) | \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
|
||||
((bits) << (bit_ofs)); \
|
||||
if ((bit_ofs) + (bit_len) > 8) \
|
||||
(bit_ptr)[1]= ((bits) & ((1 << (bit_len)) - 1)) >> (8 - (bit_ofs)); \
|
||||
(bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \
|
||||
((bits) >> (8 - (bit_ofs))); \
|
||||
}
|
||||
|
||||
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
|
Reference in New Issue
Block a user