~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_delete.cc

Moved opt_range.[cc,h] into the optimizer directory and namespace and renamed the files to
range.[cc,h]. Removed the opt_range.h include in the server_includes.h header file. Need to do more
work on that header file as I had to add some extra includes in there to compensate for removing
that header file. Cleaned up a bunch of style in the range.[cc,h] files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <drizzled/sql_base.h>
27
27
#include <drizzled/lock.h>
28
28
#include "drizzled/probes.h"
 
29
#include "drizzled/optimizer/range.h"
29
30
 
30
31
using namespace drizzled;
31
32
 
44
45
  bool          will_batch;
45
46
  int           error, loc_error;
46
47
  Table         *table;
47
 
  SQL_SELECT    *select=0;
 
48
  optimizer::SQL_SELECT *select= NULL;
48
49
  READ_RECORD   info;
49
50
  bool          using_limit=limit != HA_POS_ERROR;
50
51
  bool          transactional_table, safe_update, const_cond;
159
160
 
160
161
  table->covering_keys.reset();
161
162
  table->quick_keys.reset();            // Can't use 'only index'
162
 
  select=make_select(table, 0, 0, conds, 0, &error);
 
163
  select= optimizer::make_select(table, 0, 0, conds, 0, &error);
163
164
  if (error)
164
165
    goto err;
165
166
  if ((select && select->check_quick(session, safe_update, limit)) || !limit)
205
206
    ha_rows examined_rows;
206
207
 
207
208
    if ((!select || table->quick_keys.none()) && limit != HA_POS_ERROR)
208
 
      usable_index= get_index_for_order(table, (order_st*)(order->first), limit);
 
209
      usable_index= optimizer::get_index_for_order(table, (order_st*)(order->first), limit);
209
210
 
210
211
    if (usable_index == MAX_KEY)
211
212
    {