mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
refs #5671 also don't use copyref in ft-ops.cc
git-svn-id: file:///svn/toku/tokudb@50010 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
44e625c726
commit
4258288eb9
1 changed files with 4 additions and 4 deletions
|
@ -1388,7 +1388,7 @@ init_childinfo(FTNODE node, int childnum, FTNODE child) {
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_childkey(FTNODE node, int childnum, const DBT *pivotkey) {
|
init_childkey(FTNODE node, int childnum, const DBT *pivotkey) {
|
||||||
toku_copyref_dbt(&node->childkeys[childnum], *pivotkey);
|
toku_copy_dbt(&node->childkeys[childnum], *pivotkey);
|
||||||
node->totalchildkeylens += pivotkey->size;
|
node->totalchildkeylens += pivotkey->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4801,7 +4801,7 @@ ft_search_child(FT_HANDLE brt, FTNODE node, int childnum, ft_search_t *search, F
|
||||||
static inline int
|
static inline int
|
||||||
search_which_child_cmp_with_bound(DB *db, ft_compare_func cmp, FTNODE node, int childnum, ft_search_t *search, DBT *dbt)
|
search_which_child_cmp_with_bound(DB *db, ft_compare_func cmp, FTNODE node, int childnum, ft_search_t *search, DBT *dbt)
|
||||||
{
|
{
|
||||||
return cmp(db, toku_copyref_dbt(dbt, node->childkeys[childnum]), &search->pivot_bound);
|
return cmp(db, toku_copy_dbt(dbt, node->childkeys[childnum]), &search->pivot_bound);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -4823,7 +4823,7 @@ toku_ft_search_which_child(
|
||||||
int mi;
|
int mi;
|
||||||
while (lo < hi) {
|
while (lo < hi) {
|
||||||
mi = (lo + hi) / 2;
|
mi = (lo + hi) / 2;
|
||||||
toku_copyref_dbt(&pivotkey, node->childkeys[mi]);
|
toku_copy_dbt(&pivotkey, node->childkeys[mi]);
|
||||||
// search->compare is really strange, and only works well with a
|
// search->compare is really strange, and only works well with a
|
||||||
// linear search, it makes binary search a pita.
|
// linear search, it makes binary search a pita.
|
||||||
//
|
//
|
||||||
|
@ -4885,7 +4885,7 @@ toku_ft_search_which_child(
|
||||||
}
|
}
|
||||||
for (c = 0; c < node->n_children-1; c++) {
|
for (c = 0; c < node->n_children-1; c++) {
|
||||||
int p = (search->direction == FT_SEARCH_LEFT) ? child[c] : child[c] - 1;
|
int p = (search->direction == FT_SEARCH_LEFT) ? child[c] : child[c] - 1;
|
||||||
toku_copyref_dbt(&pivotkey, node->childkeys[p]);
|
toku_copy_dbt(&pivotkey, node->childkeys[p]);
|
||||||
if (search_pivot_is_bounded(search, desc, cmp, &pivotkey) && search->compare(search, &pivotkey)) {
|
if (search_pivot_is_bounded(search, desc, cmp, &pivotkey) && search->compare(search, &pivotkey)) {
|
||||||
return child[c];
|
return child[c];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue