~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/quick_range_select.cc

  • Committer: Mark Atwood
  • Date: 2011-08-17 19:14:47 UTC
  • mfrom: (2385.3.17 rf)
  • Revision ID: me@mark.atwood.name-20110817191447-h86yzddvycd0xmof
mergeĀ lp:~olafvdspek/drizzle/refactor6

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  index= key_nr;
63
63
  head= table;
64
64
  key_part_info= head->key_info[index].key_part;
65
 
  my_init_dynamic_array(&ranges, sizeof(optimizer::QuickRange*), 16, 16);
 
65
  ranges.init(sizeof(optimizer::QuickRange*), 16, 16);
66
66
 
67
67
  /* 'session' is not accessible in QuickRangeSelect::reset(). */
68
68
  mrr_buf_size= session->variables.read_rnd_buff_size;
121
121
        delete cursor;
122
122
      }
123
123
    }
124
 
    delete_dynamic(&ranges); /* ranges are allocated in alloc */
 
124
    ranges.free(); /* ranges are allocated in alloc */
125
125
    delete column_bitmap;
126
126
    alloc.free_root(MYF(0));
127
127
  }
131
131
 
132
132
int optimizer::QuickRangeSelect::init_ror_merged_scan(bool reuse_handler)
133
133
{
134
 
  Cursor *save_file= cursor, *org_file;
135
 
  Session *session;
 
134
  Cursor* org_file;
 
135
  Cursor* save_file= cursor;
 
136
  Session* session;
136
137
 
137
138
  in_ror_merged_scan= 1;
138
139
  if (reuse_handler)
153
154
  }
154
155
 
155
156
  session= head->in_use;
156
 
  if (! (cursor= head->cursor->clone(session->mem_root)))
 
157
  if (not (cursor= head->cursor->clone(session->mem_root)))
157
158
  {
158
159
    /*
159
160
      Manually set the error flag. Note: there seems to be quite a few
191
192
  org_file= head->cursor;
192
193
  head->cursor= cursor;
193
194
  /* We don't have to set 'head->keyread' here as the 'cursor' is unique */
194
 
  if (! head->no_keyread)
 
195
  if (not head->no_keyread)
195
196
  {
196
197
    head->key_read= 1;
197
198
    head->mark_columns_used_by_index(index);