Commit 14db40bc authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #977

temporary change to test if just doing a memcpy will work for unpacking
a Field_new_decimal
real change is to modify Field_new_decimal, but by checking this in, we can
quickly get regression results

git-svn-id: file:///svn/mysql/tokudb-engine/src@4904 c7de825b-a66e-492c-adef-691d508d4ae1
parent 12a276cf
......@@ -1483,16 +1483,23 @@ void ha_tokudb::unpack_key(uchar * record, DBT * key, uint index) {
/* tokutek change to make pack_key and unpack_key work for
decimals */
uint unpack_length = key_part->length;
//
// TEMPORARY HACK
// True change is to modify the Field_new_decimal class to properly
// implement unpack_key, pack_key, and pack_cmp, part of ticket 977
//
if (key_part->field->type() == MYSQL_TYPE_NEWDECIMAL) {
Field_new_decimal *field_nd = (Field_new_decimal *) key_part->field;
unpack_length += field_nd->precision << 8;
memcpy(record + field_offset(key_part->field), pos, key_part->length);
pos += key_part->length;
}
pos = (uchar *) key_part->field->unpack_key(record + field_offset(key_part->field), pos,
else {
pos = (uchar *) key_part->field->unpack_key(record + field_offset(key_part->field), pos,
#if MYSQL_VERSION_ID < 50123
unpack_length);
unpack_length);
#else
unpack_length, table->s->db_low_byte_first);
unpack_length, table->s->db_low_byte_first);
#endif
}
}
}
......
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