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

addresses #1614

fix ::get_pos for hidden primary keys

git-svn-id: file:///svn/mysql/tokudb-engine/src@10703 c7de825b-a66e-492c-adef-691d508d4ae1
parent c5290d8c
......@@ -3227,8 +3227,14 @@ DBT *ha_tokudb::get_pos(DBT * to, uchar * pos) {
TOKUDB_DBUG_ENTER("ha_tokudb::get_pos");
/* We don't need to set app_data here */
bzero((void *) to, sizeof(*to));
to->data = pos + sizeof(u_int32_t);
to->size = *(u_int32_t *)pos;
if (hidden_primary_key) {
to->data = pos;
to->size = TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH;
}
else {
to->data = pos + sizeof(u_int32_t);
to->size = *(u_int32_t *)pos;
}
DBUG_DUMP("key", (const uchar *) to->data, to->size);
DBUG_RETURN(to);
}
......
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