Commit 8ec56a90 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1619

fix fixstring type

git-svn-id: file:///svn/mysql/tokudb-engine/src@10856 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7f3d9efa
......@@ -591,9 +591,14 @@ int compare_field(
case (toku_type_fixstring):
num_bytes = field->pack_length();
set_if_smaller(num_bytes, key_part_length);
ret_val = cmp_toku_string(a_buf, num_bytes, b_buf,num_bytes, field->charset()->number);
*a_bytes_read = num_bytes;
*b_bytes_read = num_bytes;
ret_val = cmp_toku_varstring(
a_buf,
b_buf,
get_length_bytes_from_max(num_bytes),
field->charset()->number,
a_bytes_read,
b_bytes_read
);
goto exit;
case (toku_type_varbinary):
ret_val = cmp_toku_varbinary(
......@@ -665,7 +670,6 @@ uchar* pack_toku_field(
case (toku_type_decimal):
case (toku_type_bitstream):
case (toku_type_fixbinary):
case (toku_type_fixstring):
num_bytes = field->pack_length();
set_if_smaller(num_bytes, key_part_length);
new_pos = pack_toku_binary(
......@@ -674,6 +678,18 @@ uchar* pack_toku_field(
num_bytes
);
goto exit;
case (toku_type_fixstring):
num_bytes = field->pack_length();
set_if_smaller(num_bytes, key_part_length);
new_pos = pack_toku_varstring(
to_tokudb,
from_mysql,
get_length_bytes_from_max(key_part_length),
0,
num_bytes,
field->charset()
);
goto exit;
case (toku_type_varbinary):
new_pos = pack_toku_varbinary(
to_tokudb,
......@@ -805,7 +821,6 @@ uchar* unpack_toku_field(
case (toku_type_decimal):
case (toku_type_bitstream):
case (toku_type_fixbinary):
case (toku_type_fixstring):
num_bytes = field->pack_length();
set_if_smaller(num_bytes, key_part_length);
new_pos = unpack_toku_binary(
......@@ -814,6 +829,14 @@ uchar* unpack_toku_field(
num_bytes
);
goto exit;
case (toku_type_fixstring):
new_pos = unpack_toku_varbinary(
to_mysql,
from_tokudb,
get_length_bytes_from_max(key_part_length),
0
);
goto exit;
case (toku_type_varbinary):
case (toku_type_varstring):
new_pos = unpack_toku_varbinary(
......
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