~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/sum.cc

  • Committer: Brian Aker
  • Date: 2010-07-16 19:54:08 UTC
  • mfrom: (1660.1.4 rollup)
  • Revision ID: brian@gaz-20100716195408-8fiuxwmy4mpqq4ko
Rollup patch + fix for not intel processors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
 
240
240
              ref.key_buff= key_buff;
241
241
              Item_field *item_field= (Item_field*) (expr->real_item());
242
 
              Table *table= item_field->field->table;
 
242
              Table *table= item_field->field->getTable();
243
243
 
244
244
              /*
245
245
                 Look for a partial key that can be used for optimization.
407
407
 
408
408
              ref.key_buff= key_buff;
409
409
              Item_field *item_field= (Item_field*) (expr->real_item());
410
 
              Table *table= item_field->field->table;
 
410
              Table *table= item_field->field->getTable();
411
411
 
412
412
              /*
413
413
                 Look for a partial key that can be used for optimization.
662
662
 
663
663
  field->setWriteSet();
664
664
 
665
 
  if (! (cond->used_tables() & field->table->map))
 
665
  if (! (cond->used_tables() & field->getTable()->map))
666
666
  {
667
667
    /* Condition doesn't restrict the used table */
668
668
    return 1;
907
907
    return 0; // Not key field
908
908
  }
909
909
 
910
 
  Table *table= field->table;
 
910
  Table *table= field->getTable();
911
911
  uint32_t idx= 0;
912
912
 
913
913
  KeyInfo *keyinfo,*keyinfo_end= NULL;
1028
1028
                           uint32_t range_fl,
1029
1029
                           uint32_t prefix_len)
1030
1030
{
1031
 
  if (key_cmp_if_same(field->table, ref->key_buff, ref->key, prefix_len))
 
1031
  if (key_cmp_if_same(field->getTable(), ref->key_buff, ref->key, prefix_len))
1032
1032
  {
1033
1033
    return 1;
1034
1034
  }
1069
1069
    return 0;
1070
1070
  }
1071
1071
 
1072
 
  if (cond->used_tables() != field->table->map)
 
1072
  if (cond->used_tables() != field->getTable()->map)
1073
1073
  {
1074
1074
    return 0;
1075
1075
  }