~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rnext.cc

  • Committer: Brian Aker
  • Date: 2009-03-22 21:27:04 UTC
  • mfrom: (960.2.22 mordred)
  • Revision ID: brian@tangent.org-20090322212704-ysn4mkkjg2u9kv22
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        or heap_rfirst(). As last key position (info->last_pos) is available,
41
41
        we only need to climb the tree using tree_search_next().
42
42
      */
43
 
      pos = tree_search_next(&keyinfo->rb_tree, &info->last_pos,
44
 
                             offsetof(TREE_ELEMENT, left),
45
 
                             offsetof(TREE_ELEMENT, right));
 
43
      pos = (unsigned char *)tree_search_next(&keyinfo->rb_tree,
 
44
                                              &info->last_pos,
 
45
                                              offsetof(TREE_ELEMENT, left),
 
46
                                              offsetof(TREE_ELEMENT, right));
46
47
    }
47
48
    else if (!info->lastkey_len)
48
49
    {
57
58
        zero. tree_search_edge() is a kind of optimisation here as it should be
58
59
        faster than tree_search_key().
59
60
      */
60
 
      pos= tree_search_edge(&keyinfo->rb_tree, info->parents,
61
 
                            &info->last_pos, offsetof(TREE_ELEMENT, left));
 
61
      pos= (unsigned char *)tree_search_edge(&keyinfo->rb_tree, info->parents,
 
62
                                             &info->last_pos,
 
63
                                             offsetof(TREE_ELEMENT, left));
62
64
    }
63
65
    else
64
66
    {
71
73
      custom_arg.keyseg = keyinfo->seg;
72
74
      custom_arg.key_length = info->lastkey_len;
73
75
      custom_arg.search_flag = SEARCH_SAME | SEARCH_FIND;
74
 
      pos = tree_search_key(&keyinfo->rb_tree, info->lastkey, info->parents,
75
 
                           &info->last_pos, info->last_find_flag, &custom_arg);
 
76
      pos = (unsigned char *)tree_search_key(&keyinfo->rb_tree,
 
77
                                             info->lastkey, info->parents,
 
78
                                             &info->last_pos,
 
79
                                             info->last_find_flag,
 
80
                                             &custom_arg);
76
81
    }
77
82
    if (pos)
78
83
    {