1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix for HEAP rb-tree indexes and BIG_TABLES problem (serg: thanks for discovery)

This commit is contained in:
ram@mysql.r18.ru
2002-11-11 13:34:47 +04:00
parent 46a74ce73b
commit 206a59c8c3
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
TREE_ELEMENT ***last_pos, int child_offs); TREE_ELEMENT ***last_pos, int child_offs);
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
int r_offs); int r_offs);
uint tree_record_pos(TREE *tree, const void *key, ha_rows tree_record_pos(TREE *tree, const void *key,
enum ha_rkey_function search_flag, void *custom_arg); enum ha_rkey_function search_flag, void *custom_arg);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -439,14 +439,14 @@ void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
Expected that tree is fully balanced Expected that tree is fully balanced
(each path from root to leaf has the same length) (each path from root to leaf has the same length)
*/ */
uint tree_record_pos(TREE *tree, const void *key, ha_rows tree_record_pos(TREE *tree, const void *key,
enum ha_rkey_function flag, void *custom_arg) enum ha_rkey_function flag, void *custom_arg)
{ {
int cmp; int cmp;
TREE_ELEMENT *element= tree->root; TREE_ELEMENT *element= tree->root;
double left= 1; double left= 1;
double right= tree->elements_in_tree; double right= tree->elements_in_tree;
uint last_equal_pos= HA_POS_ERROR; ha_rows last_equal_pos= HA_POS_ERROR;
while (element != &tree->null_element) while (element != &tree->null_element)
{ {