Commit 687aea89 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1158

most regressions fixed now, 2 more remaining it seems

git-svn-id: file:///svn/mysql/tokudb-engine/src@6182 c7de825b-a66e-492c-adef-691d508d4ae1
parent 5e6f12f9
......@@ -1334,7 +1334,7 @@ int ha_tokudb::open(const char *name, int mode, uint test_if_locked) {
KEY_PART_INFO *end = key_part + table->key_info[primary_key].key_parts;
for (; key_part != end; key_part++)
ref_length += key_part->field->max_packed_col_length(key_part->length);
share->fixed_length_primary_key = (ref_length == table->key_info[primary_key].key_length);
share->fixed_length_primary_key = (ref_length == table->key_info[primary_key].key_length + sizeof(uchar));
share->status |= STATUS_PRIMARY_KEY_INIT;
}
share->ref_length = ref_length;
......@@ -3375,12 +3375,13 @@ DBT *ha_tokudb::get_pos(DBT * to, uchar * pos) {
// this should really be done through pack_key functions
//
to->data = pos;
if (!hidden_primary_key) {
*pos++ = COL_NEG_INF;
}
if (share->fixed_length_primary_key)
to->size = ref_length;
else {
//
// move up infinity byte
//
pos++;
KEY_PART_INFO *key_part = table->key_info[primary_key].key_part;
KEY_PART_INFO *end = key_part + table->key_info[primary_key].key_parts;
......
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