~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/quick_ror_union_select.cc

  • Committer: Mark Atwood
  • Date: 2011-06-24 02:13:02 UTC
  • mfrom: (2318.6.56 rf)
  • Revision ID: me@mark.atwood.name-20110624021302-y9oiksid220xan9s
mergeĀ lp:~olafvdspek/drizzle/refactor14

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
int optimizer::QuickRorUnionSelect::init()
71
71
{
72
 
  queue=
73
 
    new priority_queue<optimizer::QuickSelectInterface *,
74
 
                       vector<optimizer::QuickSelectInterface *>,
75
 
                       optimizer::compare_functor >(optimizer::compare_functor(this));
76
 
  if (! (cur_rowid= (unsigned char*) alloc.alloc_root(2 * head->cursor->ref_length)))
77
 
  {
78
 
    return 0;
79
 
  }
 
72
  queue= new priority_queue<QuickSelectInterface*, vector<QuickSelectInterface*>, compare_functor>(compare_functor(this));
 
73
  cur_rowid= alloc.alloc(2 * head->cursor->ref_length);
80
74
  prev_rowid= cur_rowid + head->cursor->ref_length;
81
75
  return 0;
82
76
}
84
78
 
85
79
int optimizer::QuickRorUnionSelect::reset()
86
80
{
87
 
  int error;
88
81
  have_prev_rowid= false;
89
82
  if (! scans_inited)
90
83
  {
116
109
      return 0;
117
110
    }
118
111
    
119
 
    error= (*it)->get_next();
 
112
    int error= (*it)->get_next();
120
113
    if (error)
121
114
    {
122
115
      if (error == HA_ERR_END_OF_FILE)
137
130
}
138
131
 
139
132
 
140
 
bool
141
 
optimizer::QuickRorUnionSelect::push_quick_back(QuickSelectInterface *quick_sel_range)
 
133
void optimizer::QuickRorUnionSelect::push_quick_back(QuickSelectInterface *quick_sel_range)
142
134
{
143
135
  quick_selects.push_back(quick_sel_range);
144
 
  return false;
145
136
}
146
137
 
147
138