Commit 9067dc14 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2054], some cleanup of comparison function and of status.tokudb

git-svn-id: file:///svn/mysql/tokudb-engine/src@15455 c7de825b-a66e-492c-adef-691d508d4ae1
parent 07dbc527
......@@ -4957,21 +4957,6 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
goto cleanup;
}
//
// create a row descriptor that is the same as a hidden primary key
//
row_descriptor.size = create_toku_key_descriptor(
row_desc_buff,
true,
false,
NULL,
false,
NULL
);
error = status_block->set_descriptor(status_block, 1, &row_descriptor, toku_dbt_up);
if (error) {
goto cleanup;
}
if (!(error = (status_block->open(status_block, NULL, name_buff, NULL, DB_BTREE, DB_CREATE, 0)))) {
uint version = HA_TOKU_VERSION;
uint capabilities = HA_TOKU_CAP;
......
......@@ -1424,7 +1424,7 @@ int tokudb_cmp_dbt_data(DB *file, const DBT *keya, const DBT *keyb) {
// for no_dup tables, file->descriptor->size == row_desc_offset
// so just use a default comparison function
//
if (file->descriptor->size - row_desc_offset == 0) {
if ( (file->descriptor->size == 0) || (file->descriptor->size - row_desc_offset == 0) ) {
int num_bytes_cmp = keya->size < keyb->size ?
keya->size : keyb->size;
cmp = memcmp(keya->data,keyb->data,num_bytes_cmp);
......
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