~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

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>
52
53
 
53
54
using namespace std;
54
55
 
6228
6229
{
6229
6230
  uint32_t null_fields,blobs,fields,rec_length;
6230
6231
  Field **f_ptr,*field;
6231
 
  MY_BITMAP *read_set= join_tab->table->read_set;;
 
6232
  bitset<MAX_FIELDS> *read_set= join_tab->table->read_set;
6232
6233
 
6233
6234
  null_fields= blobs= fields= rec_length=0;
6234
6235
  for (f_ptr=join_tab->table->field ; (field= *f_ptr) ; f_ptr++)
6235
6236
  {
6236
 
    if (bitmap_is_set(read_set, field->field_index))
 
6237
    if (read_set->test(field->field_index))
6237
6238
    {
6238
6239
      uint32_t flags=field->flags;
6239
6240
      fields++;
6254
6255
                             (join_tab->table->getRecordLength()- rec_length));
6255
6256
    rec_length+=(uint32_t) cmax((uint32_t)4,blob_length);
6256
6257
  }
6257
 
  join_tab->used_fields=fields;
6258
 
  join_tab->used_fieldlength=rec_length;
6259
 
  join_tab->used_blobs=blobs;
 
6258
  join_tab->used_fields= fields;
 
6259
  join_tab->used_fieldlength= rec_length;
 
6260
  join_tab->used_blobs= blobs;
6260
6261
}
6261
6262
 
6262
6263
 
13761
13762
  {
13762
13763
    uint32_t null_fields=0, used_fields;
13763
13764
    Field **f_ptr,*field;
13764
 
    MY_BITMAP *read_set= tables[i].table->read_set;
 
13765
    bitset<MAX_FIELDS> *read_set= tables[i].table->read_set;
13765
13766
    for (f_ptr=tables[i].table->field,used_fields=tables[i].used_fields ;
13766
13767
         used_fields ;
13767
13768
         f_ptr++)
13768
13769
    {
13769
13770
      field= *f_ptr;
13770
 
      if (bitmap_is_set(read_set, field->field_index))
 
13771
      if (read_set->test(field->field_index))
13771
13772
      {
13772
13773
        used_fields--;
13773
13774
        length+=field->fill_cache_field(copy);
13829
13830
            (size_t)cache->length);
13830
13831
  if (!(cache->buff=(unsigned char*) malloc(size)))
13831
13832
    return 1;                           /* Don't use cache */ /* purecov: inspected */
13832
 
  cache->end=cache->buff+size;
 
13833
  cache->end= cache->buff+size;
13833
13834
  reset_cache_write(cache);
13834
13835
  return 0;
13835
13836
}