~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Monty Taylor
  • Date: 2009-05-08 19:27:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1009.
  • Revision ID: mordred@inaugust.com-20090508192721-glbsg850k7wqp1rd
Further reversion of P.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include "drizzled/index_hint.h"
50
50
 
51
51
#include <string>
52
 
#include <bitset>
53
52
 
54
53
using namespace std;
55
54
 
6229
6228
{
6230
6229
  uint32_t null_fields,blobs,fields,rec_length;
6231
6230
  Field **f_ptr,*field;
6232
 
  bitset<MAX_FIELDS> *read_set= join_tab->table->read_set;
 
6231
  MY_BITMAP *read_set= join_tab->table->read_set;;
6233
6232
 
6234
6233
  null_fields= blobs= fields= rec_length=0;
6235
6234
  for (f_ptr=join_tab->table->field ; (field= *f_ptr) ; f_ptr++)
6236
6235
  {
6237
 
    if (read_set->test(field->field_index))
 
6236
    if (bitmap_is_set(read_set, field->field_index))
6238
6237
    {
6239
6238
      uint32_t flags=field->flags;
6240
6239
      fields++;
6255
6254
                             (join_tab->table->getRecordLength()- rec_length));
6256
6255
    rec_length+=(uint32_t) cmax((uint32_t)4,blob_length);
6257
6256
  }
6258
 
  join_tab->used_fields= fields;
6259
 
  join_tab->used_fieldlength= rec_length;
6260
 
  join_tab->used_blobs= blobs;
 
6257
  join_tab->used_fields=fields;
 
6258
  join_tab->used_fieldlength=rec_length;
 
6259
  join_tab->used_blobs=blobs;
6261
6260
}
6262
6261
 
6263
6262
 
13753
13752
  {
13754
13753
    uint32_t null_fields=0, used_fields;
13755
13754
    Field **f_ptr,*field;
13756
 
    bitset<MAX_FIELDS> *read_set= tables[i].table->read_set;
 
13755
    MY_BITMAP *read_set= tables[i].table->read_set;
13757
13756
    for (f_ptr=tables[i].table->field,used_fields=tables[i].used_fields ;
13758
13757
         used_fields ;
13759
13758
         f_ptr++)
13760
13759
    {
13761
13760
      field= *f_ptr;
13762
 
      if (read_set->test(field->field_index))
 
13761
      if (bitmap_is_set(read_set, field->field_index))
13763
13762
      {
13764
13763
        used_fields--;
13765
13764
        length+=field->fill_cache_field(copy);
13821
13820
            (size_t)cache->length);
13822
13821
  if (!(cache->buff=(unsigned char*) malloc(size)))
13823
13822
    return 1;                           /* Don't use cache */ /* purecov: inspected */
13824
 
  cache->end= cache->buff+size;
 
13823
  cache->end=cache->buff+size;
13825
13824
  reset_cache_write(cache);
13826
13825
  return 0;
13827
13826
}