Commit 71f21bfd authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2676], get handlerton compiling with new descriptor interface

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@20779 c7de825b-a66e-492c-adef-691d508d4ae1
parent de101e1a
...@@ -1006,7 +1006,7 @@ int generate_row_for_put( ...@@ -1006,7 +1006,7 @@ int generate_row_for_put(
uchar* buff = NULL; uchar* buff = NULL;
u_int32_t max_key_len = 0; u_int32_t max_key_len = 0;
row_desc = (uchar *)curr_db->descriptor->data; row_desc = (uchar *)curr_db->descriptor->dbt.data;
row_desc += (*(u_int32_t *)row_desc); row_desc += (*(u_int32_t *)row_desc);
desc_size = (*(u_int32_t *)row_desc) - 4; desc_size = (*(u_int32_t *)row_desc) - 4;
row_desc += 4; row_desc += 4;
...@@ -2763,8 +2763,8 @@ int ha_tokudb::cmp_ref(const uchar * ref1, const uchar * ref2) { ...@@ -2763,8 +2763,8 @@ int ha_tokudb::cmp_ref(const uchar * ref1, const uchar * ref2) {
*(u_int32_t *)ref1, *(u_int32_t *)ref1,
ref2 + sizeof(u_int32_t), ref2 + sizeof(u_int32_t),
*(u_int32_t *)ref2, *(u_int32_t *)ref2,
(uchar *)share->file->descriptor->data + 4, (uchar *)share->file->descriptor->dbt.data + 4,
*(u_int32_t *)share->file->descriptor->data - 4, *(u_int32_t *)share->file->descriptor->dbt.data - 4,
false false
); );
return ret_val; return ret_val;
...@@ -3244,7 +3244,7 @@ void ha_tokudb::test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val) { ...@@ -3244,7 +3244,7 @@ void ha_tokudb::test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val) {
// //
// TEST // TEST
// //
row_desc = (uchar *)share->key_file[keynr]->descriptor->data; row_desc = (uchar *)share->key_file[keynr]->descriptor->dbt.data;
row_desc += (*(u_int32_t *)row_desc); row_desc += (*(u_int32_t *)row_desc);
desc_size = (*(u_int32_t *)row_desc) - 4; desc_size = (*(u_int32_t *)row_desc) - 4;
row_desc += 4; row_desc += 4;
...@@ -3268,7 +3268,7 @@ void ha_tokudb::test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val) { ...@@ -3268,7 +3268,7 @@ void ha_tokudb::test_row_packing(uchar* record, DBT* pk_key, DBT* pk_val) {
uchar* tmp_buff = NULL; uchar* tmp_buff = NULL;
tmp_buff = (uchar *)my_malloc(alloced_rec_buff_length,MYF(MY_WME)); tmp_buff = (uchar *)my_malloc(alloced_rec_buff_length,MYF(MY_WME));
assert(tmp_buff); assert(tmp_buff);
row_desc = (uchar *)share->key_file[keynr]->descriptor->data; row_desc = (uchar *)share->key_file[keynr]->descriptor->dbt.data;
row_desc += (*(u_int32_t *)row_desc); row_desc += (*(u_int32_t *)row_desc);
row_desc += (*(u_int32_t *)row_desc); row_desc += (*(u_int32_t *)row_desc);
desc_size = (*(u_int32_t *)row_desc) - 4; desc_size = (*(u_int32_t *)row_desc) - 4;
...@@ -5416,7 +5416,7 @@ static int create_sub_table(const char *table_name, DBT* row_descriptor, DB_TXN* ...@@ -5416,7 +5416,7 @@ static int create_sub_table(const char *table_name, DBT* row_descriptor, DB_TXN*
goto exit; goto exit;
} }
error = file->set_descriptor(file, 1, row_descriptor, toku_dbt_up); error = file->set_descriptor(file, 1, row_descriptor);
if (error) { if (error) {
DBUG_PRINT("error", ("Got error: %d when setting row descriptor for table '%s'", error, table_name)); DBUG_PRINT("error", ("Got error: %d when setting row descriptor for table '%s'", error, table_name));
goto exit; goto exit;
......
...@@ -1523,7 +1523,7 @@ int tokudb_compare_two_keys( ...@@ -1523,7 +1523,7 @@ int tokudb_compare_two_keys(
int tokudb_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) { int tokudb_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) {
int cmp; int cmp;
if (file->descriptor->size == 0) { if (file->descriptor->dbt.size == 0) {
int num_bytes_cmp = keya->size < keyb->size ? int num_bytes_cmp = keya->size < keyb->size ?
keya->size : keyb->size; keya->size : keyb->size;
cmp = memcmp(keya->data,keyb->data,num_bytes_cmp); cmp = memcmp(keya->data,keyb->data,num_bytes_cmp);
...@@ -1537,8 +1537,8 @@ int tokudb_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) { ...@@ -1537,8 +1537,8 @@ int tokudb_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) {
keya->size, keya->size,
keyb->data, keyb->data,
keyb->size, keyb->size,
(uchar *)file->descriptor->data + 4, (uchar *)file->descriptor->dbt.data + 4,
(*(u_int32_t *)file->descriptor->data) - 4, (*(u_int32_t *)file->descriptor->dbt.data) - 4,
false false
); );
} }
...@@ -1552,8 +1552,8 @@ int tokudb_prefix_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) { ...@@ -1552,8 +1552,8 @@ int tokudb_prefix_cmp_dbt_key(DB *file, const DBT *keya, const DBT *keyb) {
keya->size, keya->size,
keyb->data, keyb->data,
keyb->size, keyb->size,
(uchar *)file->descriptor->data + 4, (uchar *)file->descriptor->dbt.data + 4,
*(u_int32_t *)file->descriptor->data - 4, *(u_int32_t *)file->descriptor->dbt.data - 4,
true true
); );
return cmp; return 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