mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
addresses #1569
remove tokudb_compare_two_hidden_keys from ::cmp_ref git-svn-id: file:///svn/mysql/tokudb-engine/src@10981 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
29b0f1703e
commit
70d1c13fe7
3 changed files with 12 additions and 34 deletions
|
@ -1628,18 +1628,6 @@ ha_rows ha_tokudb::estimate_rows_upper_bound() {
|
|||
//
|
||||
int ha_tokudb::cmp_ref(const uchar * ref1, const uchar * ref2) {
|
||||
int ret_val = 0;
|
||||
KEY *key_info = NULL;
|
||||
|
||||
if (hidden_primary_key) {
|
||||
ret_val = tokudb_compare_two_hidden_keys(
|
||||
(void *)ref1,
|
||||
TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH,
|
||||
(void *)ref2,
|
||||
TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH
|
||||
);
|
||||
goto exit;
|
||||
}
|
||||
key_info = &table->key_info[table_share->primary_key];
|
||||
ret_val = tokudb_compare_two_keys(
|
||||
ref1 + sizeof(u_int32_t),
|
||||
*(u_int32_t *)ref1,
|
||||
|
@ -1649,7 +1637,6 @@ int ha_tokudb::cmp_ref(const uchar * ref1, const uchar * ref2) {
|
|||
*(u_int32_t *)share->file->descriptor.data,
|
||||
false
|
||||
);
|
||||
exit:
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
|
|
@ -581,6 +581,18 @@ inline int cmp_toku_varstring(
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
inline int tokudb_compare_two_hidden_keys(
|
||||
const void* new_key_data,
|
||||
const u_int32_t new_key_size,
|
||||
const void* saved_key_data,
|
||||
const u_int32_t saved_key_size
|
||||
) {
|
||||
assert( (new_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH) && (saved_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH) );
|
||||
ulonglong a = hpk_char_to_num((uchar *) new_key_data);
|
||||
ulonglong b = hpk_char_to_num((uchar *) saved_key_data);
|
||||
return a < b ? -1 : (a > b ? 1 : 0);
|
||||
}
|
||||
|
||||
inline int compare_toku_field(
|
||||
uchar* a_buf,
|
||||
uchar* b_buf,
|
||||
|
@ -892,18 +904,6 @@ exit:
|
|||
}
|
||||
|
||||
|
||||
inline int tokudb_compare_two_hidden_keys(
|
||||
const void* new_key_data,
|
||||
const u_int32_t new_key_size,
|
||||
const void* saved_key_data,
|
||||
const u_int32_t saved_key_size
|
||||
) {
|
||||
assert( (new_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH) && (saved_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH) );
|
||||
ulonglong a = hpk_char_to_num((uchar *) new_key_data);
|
||||
ulonglong b = hpk_char_to_num((uchar *) saved_key_data);
|
||||
return a < b ? -1 : (a > b ? 1 : 0);
|
||||
}
|
||||
|
||||
int tokudb_compare_two_keys(
|
||||
const void* new_key_data,
|
||||
const u_int32_t new_key_size,
|
||||
|
|
|
@ -82,15 +82,6 @@ inline ulonglong hpk_char_to_num(uchar* val) {
|
|||
return uint8korr(val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline int tokudb_compare_two_hidden_keys(
|
||||
const void* new_key_data,
|
||||
const u_int32_t new_key_size,
|
||||
const void* saved_key_data,
|
||||
const u_int32_t saved_key_size
|
||||
);
|
||||
|
||||
int tokudb_compare_two_keys(
|
||||
const void* new_key_data,
|
||||
const u_int32_t new_key_size,
|
||||
|
|
Loading…
Reference in a new issue