Commit fa63f152 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1819

fix unpacking of fixed char fields

git-svn-id: file:///svn/mysql/tokudb-engine/src@12905 c7de825b-a66e-492c-adef-691d508d4ae1
parent e561deae
......@@ -5648,6 +5648,7 @@ int ha_tokudb::delete_all_rows() {
if (error == 0)
share->rows = 0;
TOKUDB_DBUG_RETURN(error);
}
......
......@@ -1205,6 +1205,7 @@ uchar* unpack_toku_key_field(
{
uchar* new_pos = NULL;
u_int32_t num_bytes = 0;
u_int32_t num_bytes_copied;
TOKU_TYPE toku_type = mysql_to_toku_type(field);
switch(toku_type) {
case (toku_type_int):
......@@ -1235,12 +1236,15 @@ uchar* unpack_toku_key_field(
);
goto exit;
case (toku_type_fixstring):
num_bytes = field->pack_length();
new_pos = unpack_toku_varbinary(
to_mysql,
from_tokudb,
get_length_bytes_from_max(key_part_length),
0
);
num_bytes_copied = new_pos - (from_tokudb + get_length_bytes_from_max(key_part_length));
bfill(to_mysql+num_bytes_copied, num_bytes - num_bytes_copied, field->charset()->pad_char);
goto exit;
case (toku_type_varbinary):
case (toku_type_varstring):
......
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