1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

BUG#26969:

Field_bit::pack() and Field_bit::unpack() does not work correctly

Fixing code for Field_bit packing and unpacking to work with arbitrary
pointers instead of requiring Field::ptr


sql/field.cc:
  Fixing Field_bit::pack() and Field_bit::unpack() so that they accept
  an arbitrary pointer to pack/unpack to/from.
sql/sql_class.cc:
  Removing unneeded move_field_offset() nefore packing field.
This commit is contained in:
unknown
2007-03-20 14:13:07 +01:00
parent 44c41cc2e5
commit bd299fdf6c
2 changed files with 31 additions and 7 deletions

View File

@@ -2619,9 +2619,7 @@ THD::pack_row(TABLE *table, MY_BITMAP const* cols,
/*
We only store the data of the field if it is non-null
*/
field->move_field_offset(offset);
pack_ptr= (byte*)field->pack((char *) pack_ptr, field->ptr);
field->move_field_offset(-offset);
pack_ptr= (byte*)field->pack((char *) pack_ptr, field->ptr + offset);
}
null_mask <<= 1;