~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/sum.cc

  • Committer: Joe Daly
  • Date: 2010-05-27 02:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 1614.
  • Revision ID: skinny.moey@gmail.com-20100527025916-o4wieb1hxk2shq4u
add status_vars to scoreboard, initial pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
                const_result= 0;
262
262
                break;
263
263
              }
264
 
              error= table->cursor->ha_index_init(static_cast<uint32_t>(ref.key), 1);
 
264
              error= table->cursor->startIndexScan(static_cast<uint32_t>(ref.key), 1);
265
265
 
266
266
              if (! ref.key_length)
267
267
              {
351
351
                table->key_read= 0;
352
352
                table->cursor->extra(HA_EXTRA_NO_KEYREAD);
353
353
              }
354
 
              table->cursor->ha_index_end();
 
354
              table->cursor->endIndexScan();
355
355
              if (error)
356
356
              {
357
357
                if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE)
429
429
                const_result= 0;
430
430
                break;
431
431
              }
432
 
              error= table->cursor->ha_index_init(static_cast<uint32_t>(ref.key), 1);
 
432
              error= table->cursor->startIndexScan(static_cast<uint32_t>(ref.key), 1);
433
433
 
434
434
              if (! ref.key_length)
435
435
              {
459
459
                table->key_read= 0;
460
460
                table->cursor->extra(HA_EXTRA_NO_KEYREAD);
461
461
              }
462
 
              table->cursor->ha_index_end();
 
462
              table->cursor->endIndexScan();
463
463
              if (error)
464
464
              {
465
465
                if (error == HA_ERR_KEY_NOT_FOUND || error == HA_ERR_END_OF_FILE)
647
647
*/
648
648
static bool matching_cond(bool max_fl,
649
649
                          table_reference_st *ref,
650
 
                          KEY *keyinfo,
651
 
                          KEY_PART_INFO *field_part,
 
650
                          KeyInfo *keyinfo,
 
651
                          KeyPartInfo *field_part,
652
652
                          COND *cond,
653
653
                          key_part_map *key_part_used,
654
654
                          uint32_t *range_fl,
748
748
 
749
749
  /* Check if field is part of the tested partial key */
750
750
  unsigned char *key_ptr= ref->key_buff;
751
 
  KEY_PART_INFO *part= NULL;
 
751
  KeyPartInfo *part= NULL;
752
752
  for (part= keyinfo->key_part; ; key_ptr+= part++->store_length)
753
753
 
754
754
  {
910
910
  Table *table= field->table;
911
911
  uint32_t idx= 0;
912
912
 
913
 
  KEY *keyinfo,*keyinfo_end= NULL;
914
 
  for (keyinfo= table->key_info, keyinfo_end= keyinfo+table->s->keys;
 
913
  KeyInfo *keyinfo,*keyinfo_end= NULL;
 
914
  for (keyinfo= table->key_info, keyinfo_end= keyinfo+table->getShare()->keys;
915
915
       keyinfo != keyinfo_end;
916
916
       keyinfo++,idx++)
917
917
  {
918
 
    KEY_PART_INFO *part= NULL;
919
 
    KEY_PART_INFO *part_end= NULL;
 
918
    KeyPartInfo *part= NULL;
 
919
    KeyPartInfo *part_end= NULL;
920
920
    key_part_map key_part_to_use= 0;
921
921
    /*
922
922
      Perform a check if index is not disabled by ALTER Table