mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #13601: Wrong int type for bit
The wrong value was being reported as the field_length for BIT fields, resulting in confusion for at least Connector/J. The field_length is now always the number of bits in the field, as it should be.
This commit is contained in:
@ -192,7 +192,8 @@ void key_restore(byte *to_record, byte *from_key, KEY *key_info,
|
||||
Field_bit *field= (Field_bit *) (key_part->field);
|
||||
if (field->bit_len)
|
||||
{
|
||||
uchar bits= *(from_key + key_part->length - field->field_length -1);
|
||||
uchar bits= *(from_key + key_part->length -
|
||||
field->pack_length_in_rec() - 1);
|
||||
set_rec_bits(bits, to_record + key_part->null_offset +
|
||||
(key_part->null_bit == 128),
|
||||
field->bit_ofs, field->bit_len);
|
||||
|
Reference in New Issue
Block a user