

Definition at line 176 of file opt_range.cc.
| enum SEL_ARG::leaf_color |
| enum SEL_ARG::Type |
| SEL_ARG::SEL_ARG | ( | ) | [inline] |
Definition at line 204 of file opt_range.cc.
Referenced by clone(), clone_and(), clone_first(), and clone_last().
Here is the caller graph for this function:

| SEL_ARG::SEL_ARG | ( | SEL_ARG & | ) |
Definition at line 1460 of file opt_range.cc.
References elements, field, max_flag, max_value, maybe_flag, maybe_null, min_flag, min_value, next_key_part, part, type, and use_count.
01460 :Sql_alloc() 01461 { 01462 type=arg.type; 01463 min_flag=arg.min_flag; 01464 max_flag=arg.max_flag; 01465 maybe_flag=arg.maybe_flag; 01466 maybe_null=arg.maybe_null; 01467 part=arg.part; 01468 field=arg.field; 01469 min_value=arg.min_value; 01470 max_value=arg.max_value; 01471 next_key_part=arg.next_key_part; 01472 use_count=1; elements=1; 01473 }
| SEL_ARG::SEL_ARG | ( | Field * | , | |
| const char * | , | |||
| const char * | ||||
| ) |
Definition at line 1484 of file opt_range.cc.
References left, null_element, and right.
01485 :min_flag(0), max_flag(0), maybe_flag(0), maybe_null(f->real_maybe_null()), 01486 elements(1), use_count(1), field(f), min_value((char*) min_value_arg), 01487 max_value((char*) max_value_arg), next(0),prev(0), 01488 next_key_part(0),color(BLACK),type(KEY_RANGE) 01489 { 01490 left=right= &null_element; 01491 }
| SEL_ARG::SEL_ARG | ( | Field * | field, | |
| uint8 | part, | |||
| char * | min_value, | |||
| char * | max_value, | |||
| uint8 | min_flag, | |||
| uint8 | max_flag, | |||
| uint8 | maybe_flag | |||
| ) |
Definition at line 1493 of file opt_range.cc.
References left, null_element, and right.
01495 :min_flag(min_flag_),max_flag(max_flag_),maybe_flag(maybe_flag_), 01496 part(part_),maybe_null(field_->real_maybe_null()), elements(1),use_count(1), 01497 field(field_), min_value(min_value_), max_value(max_value_), 01498 next(0),prev(0),next_key_part(0),color(BLACK),type(KEY_RANGE) 01499 { 01500 left=right= &null_element; 01501 }
| SEL_ARG::SEL_ARG | ( | enum Type | type_arg | ) | [inline] |
Definition at line 209 of file opt_range.cc.
00210 :min_flag(0),elements(1),use_count(1),left(0),next_key_part(0), 00211 color(BLACK), type(type_arg) 00212 {}
Definition at line 1503 of file opt_range.cc.
References clone(), color, elements, field, increment_use_count(), KEY_RANGE, left, max_flag, max_value, maybe_flag, min_flag, min_value, next, next_key_part, null_element, parent, part, prev, right, SEL_ARG(), and type.
Referenced by clone(), and clone_tree().
01504 { 01505 SEL_ARG *tmp; 01506 if (type != KEY_RANGE) 01507 { 01508 if (!(tmp= new SEL_ARG(type))) 01509 return 0; // out of memory 01510 tmp->prev= *next_arg; // Link into next/prev chain 01511 (*next_arg)->next=tmp; 01512 (*next_arg)= tmp; 01513 } 01514 else 01515 { 01516 if (!(tmp= new SEL_ARG(field,part, min_value,max_value, 01517 min_flag, max_flag, maybe_flag))) 01518 return 0; // OOM 01519 tmp->parent=new_parent; 01520 tmp->next_key_part=next_key_part; 01521 if (left != &null_element) 01522 tmp->left=left->clone(tmp,next_arg); 01523 01524 tmp->prev= *next_arg; // Link into next/prev chain 01525 (*next_arg)->next=tmp; 01526 (*next_arg)= tmp; 01527 01528 if (right != &null_element) 01529 if (!(tmp->right= right->clone(tmp,next_arg))) 01530 return 0; // OOM 01531 } 01532 increment_use_count(1); 01533 tmp->color= color; 01534 tmp->elements= this->elements; 01535 return tmp; 01536 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 239 of file opt_range.cc.
References cmp_max_to_max(), cmp_min_to_min(), field, max_flag, max_value, maybe_flag, min_flag, min_value, part, SEL_ARG(), and test.
Referenced by key_and().
00240 { // Get overlapping range 00241 char *new_min,*new_max; 00242 uint8 flag_min,flag_max; 00243 if (cmp_min_to_min(arg) >= 0) 00244 { 00245 new_min=min_value; flag_min=min_flag; 00246 } 00247 else 00248 { 00249 new_min=arg->min_value; flag_min=arg->min_flag; /* purecov: deadcode */ 00250 } 00251 if (cmp_max_to_max(arg) <= 0) 00252 { 00253 new_max=max_value; flag_max=max_flag; 00254 } 00255 else 00256 { 00257 new_max=arg->max_value; flag_max=arg->max_flag; 00258 } 00259 return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, 00260 test(maybe_flag && arg->maybe_flag)); 00261 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 262 of file opt_range.cc.
References field, maybe_flag, min_flag, min_value, NEAR_MAX, NEAR_MIN, part, and SEL_ARG().
00263 { // min <= X < arg->min 00264 return new SEL_ARG(field,part, min_value, arg->min_value, 00265 min_flag, arg->min_flag & NEAR_MIN ? 0 : NEAR_MAX, 00266 maybe_flag | arg->maybe_flag); 00267 }
Here is the call graph for this function:

Definition at line 268 of file opt_range.cc.
References field, max_flag, max_value, maybe_flag, min_flag, min_value, part, and SEL_ARG().
00269 { // min <= X <= key_max 00270 return new SEL_ARG(field, part, min_value, arg->max_value, 00271 min_flag, arg->max_flag, maybe_flag | arg->maybe_flag); 00272 }
Here is the call graph for this function:

| SEL_ARG * SEL_ARG::clone_tree | ( | ) |
Definition at line 1607 of file opt_range.cc.
References clone(), next, prev, and use_count.
01608 { 01609 SEL_ARG tmp_link,*next_arg,*root; 01610 next_arg= &tmp_link; 01611 root= clone((SEL_ARG *) 0, &next_arg); 01612 next_arg->next=0; // Fix last link 01613 tmp_link.next->prev=0; // Fix first link 01614 if (root) // If not OOM 01615 root->use_count= 0; 01616 return root; 01617 }
Here is the call graph for this function:

| int SEL_ARG::cmp_max_to_max | ( | SEL_ARG * | arg | ) | [inline] |
Definition at line 231 of file opt_range.cc.
References field, max_flag, max_value, and sel_cmp().
Referenced by clone_and(), copy_max(), is_same(), and key_and().
Here is the call graph for this function:

Here is the caller graph for this function:

| int SEL_ARG::cmp_max_to_min | ( | SEL_ARG * | arg | ) | [inline] |
| int SEL_ARG::cmp_min_to_max | ( | SEL_ARG * | arg | ) | [inline] |
| int SEL_ARG::cmp_min_to_min | ( | SEL_ARG * | arg | ) | [inline] |
Definition at line 223 of file opt_range.cc.
References field, min_flag, min_value, and sel_cmp().
Referenced by clone_and(), copy_min(), find_range(), is_same(), and key_and().
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 287 of file opt_range.cc.
References cmp_max_to_max(), max_flag, max_value, maybe_flag, NO_MAX_RANGE, and NO_MIN_RANGE.
Referenced by key_or().
00288 { // Get overlapping range 00289 if (cmp_max_to_max(arg) <= 0) 00290 { 00291 max_value=arg->max_value; max_flag=arg->max_flag; 00292 if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == 00293 (NO_MAX_RANGE | NO_MIN_RANGE)) 00294 return 1; // Full range 00295 } 00296 maybe_flag|=arg->maybe_flag; 00297 return 0; 00298 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void SEL_ARG::copy_max_to_min | ( | SEL_ARG * | arg | ) | [inline] |
Definition at line 275 of file opt_range.cc.
References cmp_min_to_min(), max_flag, maybe_flag, min_flag, min_value, NO_MAX_RANGE, and NO_MIN_RANGE.
Referenced by key_or().
00276 { // Get overlapping range 00277 if (cmp_min_to_min(arg) > 0) 00278 { 00279 min_value=arg->min_value; min_flag=arg->min_flag; 00280 if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == 00281 (NO_MAX_RANGE | NO_MIN_RANGE)) 00282 return 1; // Full range 00283 } 00284 maybe_flag|=arg->maybe_flag; 00285 return 0; 00286 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void SEL_ARG::copy_min_to_max | ( | SEL_ARG * | arg | ) | [inline] |
| void SEL_ARG::copy_min_to_min | ( | SEL_ARG * | arg | ) | [inline] |
Definition at line 6434 of file opt_range.cc.
References cmp, cmp_min_to_min(), key, left, null_element, and right.
Referenced by get_range().
06435 { 06436 SEL_ARG *element=this,*found=0; 06437 06438 for (;;) 06439 { 06440 if (element == &null_element) 06441 return found; 06442 int cmp=element->cmp_min_to_min(key); 06443 if (cmp == 0) 06444 return element; 06445 if (cmp < 0) 06446 { 06447 found=element; 06448 element=element->right; 06449 } 06450 else 06451 element=element->left; 06452 } 06453 }
Here is the call graph for this function:

Here is the caller graph for this function:

| SEL_ARG * SEL_ARG::first | ( | ) |
Definition at line 1538 of file opt_range.cc.
References left, and null_element.
Referenced by free_tree(), increment_use_count(), and store_min_key().
01539 { 01540 SEL_ARG *next_arg=this; 01541 if (!next_arg->left) 01542 return 0; // MAYBE_KEY 01543 while (next_arg->left != &null_element) 01544 next_arg=next_arg->left; 01545 return next_arg; 01546 }
Here is the caller graph for this function:

| void SEL_ARG::free_tree | ( | ) | [inline] |
Definition at line 401 of file opt_range.cc.
References first(), and pos().
00402 { 00403 for (SEL_ARG *pos=first(); pos ; pos=pos->next) 00404 if (pos->next_key_part) 00405 { 00406 pos->next_key_part->use_count--; 00407 pos->next_key_part->free_tree(); 00408 } 00409 }
Here is the call graph for this function:

| void SEL_ARG::increment_use_count | ( | long | count | ) | [inline] |
Definition at line 390 of file opt_range.cc.
References first(), next_key_part, pos(), and use_count.
Referenced by and_all_keys(), clone(), and key_and().
00391 { 00392 if (next_key_part) 00393 { 00394 next_key_part->use_count+=count; 00395 count*= (next_key_part->use_count-count); 00396 for (SEL_ARG *pos=next_key_part->first(); pos ; pos=pos->next) 00397 if (pos->next_key_part) 00398 pos->increment_use_count(count); 00399 } 00400 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 6384 of file opt_range.cc.
References elements, key, left, LINT_INIT, maybe_flag, next, null_element, prev, rb_insert(), right, and use_count.
Referenced by key_and().
06385 { 06386 SEL_ARG *element,**par,*last_element; 06387 LINT_INIT(par); 06388 LINT_INIT(last_element); 06389 06390 for (element= this; element != &null_element ; ) 06391 { 06392 last_element=element; 06393 if (key->cmp_min_to_min(element) > 0) 06394 { 06395 par= &element->right; element= element->right; 06396 } 06397 else 06398 { 06399 par = &element->left; element= element->left; 06400 } 06401 } 06402 *par=key; 06403 key->parent=last_element; 06404 /* Link in list */ 06405 if (par == &last_element->left) 06406 { 06407 key->next=last_element; 06408 if ((key->prev=last_element->prev)) 06409 key->prev->next=key; 06410 last_element->prev=key; 06411 } 06412 else 06413 { 06414 if ((key->next=last_element->next)) 06415 key->next->prev=key; 06416 key->prev=last_element; 06417 last_element->next=key; 06418 } 06419 key->left=key->right= &null_element; 06420 SEL_ARG *root=rb_insert(key); // rebalance tree 06421 root->use_count=this->use_count; // copy root info 06422 root->elements= this->elements+1; 06423 root->maybe_flag=this->maybe_flag; 06424 return root; 06425 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 213 of file opt_range.cc.
References cmp_max_to_max(), cmp_min_to_min(), KEY_RANGE, part, and type.
Referenced by eq_tree().
00214 { 00215 if (type != arg->type || part != arg->part) 00216 return 0; 00217 if (type != KEY_RANGE) 00218 return 1; 00219 return cmp_min_to_min(arg) == 0 && cmp_max_to_max(arg) == 0; 00220 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool SEL_ARG::is_singlepoint | ( | ) | [inline] |
Definition at line 434 of file opt_range.cc.
00435 { 00436 /* 00437 Check for NEAR_MIN ("strictly less") and NO_MIN_RANGE (-inf < field) 00438 flags, and the same for right edge. 00439 */ 00440 if (min_flag || max_flag) 00441 return FALSE; 00442 byte *min_val= (byte *)min_value; 00443 byte *max_val= (byte *)max_value; 00444 00445 if (maybe_null) 00446 { 00447 /* First byte is a NULL value indicator */ 00448 if (*min_val != *max_val) 00449 return FALSE; 00450 00451 if (*min_val) 00452 return TRUE; /* This "x IS NULL" */ 00453 min_val++; 00454 max_val++; 00455 } 00456 return !field->key_cmp(min_val, max_val); 00457 }
| SEL_ARG * SEL_ARG::last | ( | ) |
Definition at line 1548 of file opt_range.cc.
References null_element, and right.
Referenced by get_func_mm_tree(), and store_max_key().
01549 { 01550 SEL_ARG *next_arg=this; 01551 if (!next_arg->right) 01552 return 0; // MAYBE_KEY 01553 while (next_arg->right != &null_element) 01554 next_arg=next_arg->right; 01555 return next_arg; 01556 }
Here is the caller graph for this function:

| void SEL_ARG::make_root | ( | ) | [inline] |
| void SEL_ARG::maybe_smaller | ( | ) | [inline] |
| void SEL_ARG::merge_flags | ( | SEL_ARG * | arg | ) | [inline] |
Definition at line 221 of file opt_range.cc.
References maybe_flag.
Referenced by key_or().
00221 { maybe_flag|=arg->maybe_flag; }
Here is the caller graph for this function:

| SEL_ARG** SEL_ARG::parent_ptr | ( | ) | [inline] |
Definition at line 411 of file opt_range.cc.
Referenced by left_rotate(), right_rotate(), and tree_delete().
Here is the caller graph for this function:

Definition at line 6569 of file opt_range.cc.
References BLACK, color, left, left_rotate(), parent, RED, right, right_rotate(), and test_rb_tree.
Referenced by insert().
06570 { 06571 SEL_ARG *y,*par,*par2,*root; 06572 root= this; root->parent= 0; 06573 06574 leaf->color=RED; 06575 while (leaf != root && (par= leaf->parent)->color == RED) 06576 { // This can't be root or 1 level under 06577 if (par == (par2= leaf->parent->parent)->left) 06578 { 06579 y= par2->right; 06580 if (y->color == RED) 06581 { 06582 par->color=BLACK; 06583 y->color=BLACK; 06584 leaf=par2; 06585 leaf->color=RED; /* And the loop continues */ 06586 } 06587 else 06588 { 06589 if (leaf == par->right) 06590 { 06591 left_rotate(&root,leaf->parent); 06592 par=leaf; /* leaf is now parent to old leaf */ 06593 } 06594 par->color=BLACK; 06595 par2->color=RED; 06596 right_rotate(&root,par2); 06597 break; 06598 } 06599 } 06600 else 06601 { 06602 y= par2->left; 06603 if (y->color == RED) 06604 { 06605 par->color=BLACK; 06606 y->color=BLACK; 06607 leaf=par2; 06608 leaf->color=RED; /* And the loop continues */ 06609 } 06610 else 06611 { 06612 if (leaf == par->left) 06613 { 06614 right_rotate(&root,par); 06615 par=leaf; 06616 } 06617 par->color=BLACK; 06618 par2->color=RED; 06619 left_rotate(&root,par2); 06620 break; 06621 } 06622 } 06623 } 06624 root->color=BLACK; 06625 test_rb_tree(root,root->parent); 06626 return root; 06627 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool SEL_ARG::simple_key | ( | ) | [inline] |
Definition at line 386 of file opt_range.cc.
References elements, and next_key_part.
00387 { 00388 return !next_key_part && elements == 1; 00389 }
| void SEL_ARG::store | ( | uint | length, | |
| char ** | min_key, | |||
| uint | min_key_flag, | |||
| char ** | max_key, | |||
| uint | max_key_flag | |||
| ) | [inline] |
Definition at line 330 of file opt_range.cc.
References bzero, max_flag, max_value, maybe_null, memcpy, NEAR_MAX, NO_MAX_RANGE, and store_min().
Referenced by check_quick_keys(), get_quick_keys(), store_max_key(), and store_min_key().
00332 { 00333 store_min(length, min_key, min_key_flag); 00334 if (!(max_flag & NO_MAX_RANGE) && 00335 !(max_key_flag & (NO_MAX_RANGE | NEAR_MAX))) 00336 { 00337 if (maybe_null && *max_value) 00338 { 00339 **max_key=1; 00340 bzero(*max_key+1,length-1); 00341 } 00342 else 00343 memcpy(*max_key,max_value,length); 00344 (*max_key)+= length; 00345 } 00346 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 361 of file opt_range.cc.
References key, KEY_RANGE, last(), max_flag, NEAR_MAX, next_key_part, NO_MAX_RANGE, NO_MIN_RANGE, part, store(), store_max_key(), and type.
Referenced by check_quick_keys(), get_quick_keys(), and store_max_key().
00362 { 00363 SEL_ARG *key_tree= last(); 00364 key_tree->store(key[key_tree->part].store_length, 00365 range_key, NO_MIN_RANGE, range_key,*range_key_flag); 00366 (*range_key_flag)|= key_tree->max_flag; 00367 if (key_tree->next_key_part && 00368 key_tree->next_key_part->part == key_tree->part+1 && 00369 !(*range_key_flag & (NO_MAX_RANGE | NEAR_MAX)) && 00370 key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) 00371 key_tree->next_key_part->store_max_key(key,range_key, range_key_flag); 00372 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 314 of file opt_range.cc.
References bzero, GEOM_FLAG, maybe_null, memcpy, min_flag, min_value, NEAR_MIN, and NO_MIN_RANGE.
Referenced by ror_scan_selectivity(), and store().
00315 { 00316 if ((min_flag & GEOM_FLAG) || 00317 (!(min_flag & NO_MIN_RANGE) && 00318 !(min_key_flag & (NO_MIN_RANGE | NEAR_MIN)))) 00319 { 00320 if (maybe_null && *min_value) 00321 { 00322 **min_key=1; 00323 bzero(*min_key+1,length-1); 00324 } 00325 else 00326 memcpy(*min_key,min_value,length); 00327 (*min_key)+= length; 00328 } 00329 }
Here is the caller graph for this function:

Definition at line 348 of file opt_range.cc.
References first(), key, KEY_RANGE, min_flag, NEAR_MIN, next_key_part, NO_MAX_RANGE, NO_MIN_RANGE, part, store(), store_min_key(), and type.
Referenced by check_quick_keys(), get_quick_keys(), and store_min_key().
00349 { 00350 SEL_ARG *key_tree= first(); 00351 key_tree->store(key[key_tree->part].store_length, 00352 range_key,*range_key_flag,range_key,NO_MAX_RANGE); 00353 *range_key_flag|= key_tree->min_flag; 00354 if (key_tree->next_key_part && 00355 key_tree->next_key_part->part == key_tree->part+1 && 00356 !(*range_key_flag & (NO_MIN_RANGE | NEAR_MIN)) && 00357 key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) 00358 key_tree->next_key_part->store_min_key(key,range_key, range_key_flag); 00359 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 6471 of file opt_range.cc.
References BLACK, color, DBUG_ENTER, DBUG_RETURN, elements, key, left, maybe_flag, null_element, parent, parent_ptr(), rb_delete_fixup, right, test_rb_tree, and use_count.
06472 { 06473 enum leaf_color remove_color; 06474 SEL_ARG *root,*nod,**par,*fix_par; 06475 DBUG_ENTER("tree_delete"); 06476 06477 root=this; 06478 this->parent= 0; 06479 06480 /* Unlink from list */ 06481 if (key->prev) 06482 key->prev->next=key->next; 06483 if (key->next) 06484 key->next->prev=key->prev; 06485 key->increment_use_count(-1); 06486 if (!key->parent) 06487 par= &root; 06488 else 06489 par=key->parent_ptr(); 06490 06491 if (key->left == &null_element) 06492 { 06493 *par=nod=key->right; 06494 fix_par=key->parent; 06495 if (nod != &null_element) 06496 nod->parent=fix_par; 06497 remove_color= key->color; 06498 } 06499 else if (key->right == &null_element) 06500 { 06501 *par= nod=key->left; 06502 nod->parent=fix_par=key->parent; 06503 remove_color= key->color; 06504 } 06505 else 06506 { 06507 SEL_ARG *tmp=key->next; // next bigger key (exist!) 06508 nod= *tmp->parent_ptr()= tmp->right; // unlink tmp from tree 06509 fix_par=tmp->parent; 06510 if (nod != &null_element) 06511 nod->parent=fix_par; 06512 remove_color= tmp->color; 06513 06514 tmp->parent=key->parent; // Move node in place of key 06515 (tmp->left=key->left)->parent=tmp; 06516 if ((tmp->right=key->right) != &null_element) 06517 tmp->right->parent=tmp; 06518 tmp->color=key->color; 06519 *par=tmp; 06520 if (fix_par == key) // key->right == key->next 06521 fix_par=tmp; // new parent of nod 06522 } 06523 06524 if (root == &null_element) 06525 DBUG_RETURN(0); // Maybe root later 06526 if (remove_color == BLACK) 06527 root=rb_delete_fixup(root,nod,fix_par); 06528 test_rb_tree(root,root->parent); 06529 06530 root->use_count=this->use_count; // Fix root counters 06531 root->elements=this->elements-1; 06532 root->maybe_flag=this->maybe_flag; 06533 DBUG_RETURN(root); 06534 }
Here is the call graph for this function:

Definition at line 6630 of file opt_range.cc.
Referenced by tree_delete().
06631 { 06632 SEL_ARG *x,*w; 06633 root->parent=0; 06634 06635 x= key; 06636 while (x != root && x->color == SEL_ARG::BLACK) 06637 { 06638 if (x == par->left) 06639 { 06640 w=par->right; 06641 if (w->color == SEL_ARG::RED) 06642 { 06643 w->color=SEL_ARG::BLACK; 06644 par->color=SEL_ARG::RED; 06645 left_rotate(&root,par); 06646 w=par->right; 06647 } 06648 if (w->left->color == SEL_ARG::BLACK && w->right->color == SEL_ARG::BLACK) 06649 { 06650 w->color=SEL_ARG::RED; 06651 x=par; 06652 } 06653 else 06654 { 06655 if (w->right->color == SEL_ARG::BLACK) 06656 { 06657 w->left->color=SEL_ARG::BLACK; 06658 w->color=SEL_ARG::RED; 06659 right_rotate(&root,w); 06660 w=par->right; 06661 } 06662 w->color=par->color; 06663 par->color=SEL_ARG::BLACK; 06664 w->right->color=SEL_ARG::BLACK; 06665 left_rotate(&root,par); 06666 x=root; 06667 break; 06668 } 06669 } 06670 else 06671 { 06672 w=par->left; 06673 if (w->color == SEL_ARG::RED) 06674 { 06675 w->color=SEL_ARG::BLACK; 06676 par->color=SEL_ARG::RED; 06677 right_rotate(&root,par); 06678 w=par->left; 06679 } 06680 if (w->right->color == SEL_ARG::BLACK && w->left->color == SEL_ARG::BLACK) 06681 { 06682 w->color=SEL_ARG::RED; 06683 x=par; 06684 } 06685 else 06686 { 06687 if (w->left->color == SEL_ARG::BLACK) 06688 { 06689 w->right->color=SEL_ARG::BLACK; 06690 w->color=SEL_ARG::RED; 06691 left_rotate(&root,w); 06692 w=par->left; 06693 } 06694 w->color=par->color; 06695 par->color=SEL_ARG::BLACK; 06696 w->left->color=SEL_ARG::BLACK; 06697 right_rotate(&root,par); 06698 x=root; 06699 break; 06700 } 06701 } 06702 par=x->parent; 06703 } 06704 x->color=SEL_ARG::BLACK; 06705 return root; 06706 }
Referenced by clone(), make_root(), rb_delete_fixup(), rb_insert(), and tree_delete().
Definition at line 186 of file opt_range.cc.
Referenced by clone(), insert(), make_root(), SEL_ARG(), simple_key(), and tree_delete().
Definition at line 194 of file opt_range.cc.
Referenced by clone(), clone_and(), clone_first(), clone_last(), cmp_max_to_max(), cmp_max_to_min(), cmp_min_to_max(), cmp_min_to_min(), get_constant_key_infix(), TRP_GROUP_MIN_MAX::make_quick(), and SEL_ARG().
Definition at line 197 of file opt_range.cc.
Referenced by check_quick_keys(), clone(), eq_tree(), find_range(), first(), get_quick_keys(), insert(), left_rotate(), make_root(), rb_delete_fixup(), rb_insert(), right_rotate(), SEL_ARG(), and tree_delete().
Definition at line 179 of file opt_range.cc.
Referenced by QUICK_GROUP_MIN_MAX_SELECT::add_range(), check_quick_keys(), clone(), clone_and(), clone_last(), cmp_max_to_max(), cmp_max_to_min(), cmp_min_to_max(), copy_max(), copy_max_to_min(), copy_min(), copy_min_to_max(), get_constant_key_infix(), get_mm_leaf(), get_quick_keys(), SEL_ARG(), store(), and store_max_key().
| char * SEL_ARG::max_value |
Definition at line 195 of file opt_range.cc.
Referenced by QUICK_GROUP_MIN_MAX_SELECT::add_range(), clone(), clone_and(), clone_last(), cmp_max_to_max(), cmp_max_to_min(), cmp_min_to_max(), copy_max(), copy_max_to_min(), copy_min_to_max(), get_constant_key_infix(), SEL_ARG(), and store().
Definition at line 179 of file opt_range.cc.
Referenced by clone(), clone_and(), clone_first(), clone_last(), copy_max(), copy_min(), insert(), maybe_smaller(), merge_flags(), SEL_ARG(), and tree_delete().
Definition at line 181 of file opt_range.cc.
Referenced by QUICK_GROUP_MIN_MAX_SELECT::add_range(), get_constant_key_infix(), SEL_ARG(), store(), and store_min().
Definition at line 179 of file opt_range.cc.
Referenced by QUICK_GROUP_MIN_MAX_SELECT::add_range(), check_quick_keys(), clone(), clone_and(), clone_first(), clone_last(), cmp_max_to_min(), cmp_min_to_max(), cmp_min_to_min(), copy_max_to_min(), copy_min(), copy_min_to_max(), copy_min_to_min(), get_constant_key_infix(), get_func_mm_tree(), get_mm_leaf(), get_quick_keys(), SEL_ARG(), store_min(), and store_min_key().
| char* SEL_ARG::min_value |
Definition at line 195 of file opt_range.cc.
Referenced by QUICK_GROUP_MIN_MAX_SELECT::add_range(), clone(), clone_and(), clone_first(), clone_last(), cmp_max_to_min(), cmp_min_to_max(), cmp_min_to_min(), copy_max_to_min(), copy_min(), copy_min_to_max(), copy_min_to_min(), get_constant_key_infix(), get_func_mm_tree(), get_mm_leaf(), SEL_ARG(), and store_min().
Definition at line 198 of file opt_range.cc.
Referenced by and_all_keys(), clone(), clone_tree(), get_constant_key_infix(), get_range(), insert(), key_and(), key_or(), and make_root().
Definition at line 200 of file opt_range.cc.
Referenced by and_all_keys(), check_quick_keys(), clone(), eq_tree(), get_constant_key_infix(), get_quick_keys(), increment_use_count(), key_and(), key_or(), TRP_GROUP_MIN_MAX::make_quick(), ror_scan_selectivity(), SEL_ARG(), simple_key(), store_max_key(), and store_min_key().
Definition at line 199 of file opt_range.cc.
Referenced by clone(), left_rotate(), rb_delete_fixup(), rb_insert(), right_rotate(), and tree_delete().
Definition at line 180 of file opt_range.cc.
Referenced by check_quick_keys(), check_quick_select(), clone(), clone_and(), clone_first(), clone_last(), get_quick_keys(), is_same(), remove_nonrange_trees(), ror_scan_selectivity(), SEL_ARG(), store_max_key(), and store_min_key().
Definition at line 198 of file opt_range.cc.
Referenced by clone(), clone_tree(), get_constant_key_infix(), insert(), TRP_GROUP_MIN_MAX::make_quick(), and make_root().
Definition at line 197 of file opt_range.cc.
Referenced by check_quick_keys(), clone(), eq_tree(), find_range(), get_quick_keys(), insert(), last(), left_rotate(), make_root(), rb_delete_fixup(), rb_insert(), right_rotate(), SEL_ARG(), and tree_delete().
Referenced by and_all_keys(), check_quick_keys(), check_quick_select(), clone(), get_mm_leaf(), get_quick_keys(), is_same(), key_and(), SEL_ARG(), store_max_key(), and store_min_key().
Definition at line 192 of file opt_range.cc.
Referenced by clone_tree(), increment_use_count(), insert(), key_or(), make_root(), SEL_ARG(), and tree_delete().
1.4.7

