Commit 0f331fb4 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1567

only put one byte fro fixbinary, max length is 255

git-svn-id: file:///svn/mysql/tokudb-engine/src@10960 c7de825b-a66e-492c-adef-691d508d4ae1
parent f81a5dfa
...@@ -1180,14 +1180,14 @@ int create_toku_key_descriptor(KEY* key, uchar* buf) { ...@@ -1180,14 +1180,14 @@ int create_toku_key_descriptor(KEY* key, uchar* buf) {
case (toku_type_float): case (toku_type_float):
break; break;
// //
// two bytes follow stating the length of the field // one byte follow stating the length of the field
// //
case (toku_type_fixbinary): case (toku_type_fixbinary):
num_bytes_in_field = field->pack_length(); num_bytes_in_field = field->pack_length();
set_if_smaller(num_bytes_in_field, key->key_part[i].length); set_if_smaller(num_bytes_in_field, key->key_part[i].length);
assert(num_bytes_in_field < 256);
pos[0] = (uchar)(num_bytes_in_field & 255); pos[0] = (uchar)(num_bytes_in_field & 255);
pos[1] = (uchar) (num_bytes_in_field >> 8); pos++;
pos += 2;
break; break;
// //
// one byte follows: the number of bytes used to encode the length // one byte follows: the number of bytes used to encode the length
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment