diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-11-21 22:56:42 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-11-21 22:56:42 +0400 |
commit | a7c04594b8aced94b04329605f7789bb644baf91 (patch) | |
tree | 9c89743578b5c3bbc9facb8bfd530d72d512bd66 /sql/key.cc | |
parent | bb3e878159777acf2eb1d7b1d8175aedbfca632a (diff) | |
download | mariadb-git-a7c04594b8aced94b04329605f7789bb644baf91.tar.gz |
Fixed bug #32556: assert in "using index for group-by" :
is_last_prefix <= 0, file .\opt_range.cc.
SELECT ... GROUP BY bit field failed with an assertion if the
bit length of that field was not divisible by 8.
sql/key.cc:
Fixed bug #32556.
Copying of "uneven" bits of a bit field was duplicated in the
key_copy() and in the Field_bit::get_key_image().
So, instead of copying of the rest of a bit field,
Field_bit::get_key_image() copied "uneven" bits to key image again,
and the lowest field byte was not copied to key at all.
Duplicated code has been removed from the key_copy function.
mysql-test/t/type_bit.test:
Added test case for bug #32556.
mysql-test/r/type_bit.result:
Added test case for bug #32556.
Diffstat (limited to 'sql/key.cc')
-rw-r--r-- | sql/key.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sql/key.cc b/sql/key.cc index 2bdde46b6b3..1c044f3dc7d 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -106,19 +106,6 @@ void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length) key_part->null_bit); key_length--; } - if (key_part->type == HA_KEYTYPE_BIT) - { - Field_bit *field= (Field_bit *) (key_part->field); - if (field->bit_len) - { - uchar bits= get_rec_bits((uchar*) from_record + - key_part->null_offset + - (key_part->null_bit == 128), - field->bit_ofs, field->bit_len); - *to_key++= bits; - key_length--; - } - } if (key_part->key_part_flag & HA_BLOB_PART || key_part->key_part_flag & HA_VAR_LENGTH_PART) { |