~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/access_method/const.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-25 13:36:24 UTC
  • mto: This revision was merged to the branch mainline in revision 2349.
  • Revision ID: olafvdspek@gmail.com-20110625133624-hzy2ordecn161qco
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include <config.h>
22
 
#include <drizzled/session.h>
23
22
#include <drizzled/join_table.h>
 
23
#include <drizzled/optimizer/access_method/const.h>
24
24
#include <drizzled/sql_select.h>
25
 
#include <drizzled/optimizer/access_method/const.h>
26
 
 
27
 
using namespace drizzled;
28
 
 
29
 
bool optimizer::Const::getStats(Table *table,
30
 
                                JoinTable *join_tab)
 
25
#include <drizzled/table.h>
 
26
 
 
27
namespace drizzled {
 
28
 
 
29
void optimizer::Const::getStats(Table& table, JoinTable& join_tab)
31
30
{
32
 
  table->status= STATUS_NO_RECORD;
33
 
  join_tab->read_first_record= join_read_const;
34
 
  join_tab->read_record.read_record= join_no_more_records;
35
 
  if (table->covering_keys.test(join_tab->ref.key) &&
36
 
      ! table->no_keyread)
 
31
  table.status= STATUS_NO_RECORD;
 
32
  join_tab.read_first_record= join_read_const;
 
33
  join_tab.read_record.read_record= join_no_more_records;
 
34
  if (table.covering_keys.test(join_tab.ref.key) && not table.no_keyread)
37
35
  {
38
 
    table->key_read= 1;
39
 
    table->cursor->extra(HA_EXTRA_KEYREAD);
 
36
    table.key_read= 1;
 
37
    table.cursor->extra(HA_EXTRA_KEYREAD);
40
38
  }
41
 
  return false;
 
39
}
 
40
 
42
41
}