Commit 23fb4b46 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #977

remove hack to get decimals working

git-svn-id: file:///svn/mysql/tokudb-engine/src@4988 c7de825b-a66e-492c-adef-691d508d4ae1
parent 15e8649e
......@@ -1564,23 +1564,12 @@ 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) {
memcpy(record + field_offset(key_part->field), pos, key_part->length);
pos += key_part->length;
}
else {
pos = (uchar *) key_part->field->unpack_key(record + field_offset(key_part->field), pos,
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