~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_range.cc

  • Committer: Brian Aker
  • Date: 2009-07-28 23:44:32 UTC
  • mfrom: (1100.1.6 merge)
  • Revision ID: brian@gaz-20090728234432-t5hpryg40a4rz20b
Removal of all basic MRR

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
 
121
121
using namespace std;
122
122
 
 
123
#define HA_END_SPACE_KEY 0
 
124
 
123
125
/*
124
126
  Convert double value to #rows. Currently this does floor(), and we
125
127
  might consider using round() instead.
1180
1182
    free((char*) column_bitmap.bitmap);
1181
1183
  }
1182
1184
  head->column_bitmaps_set(save_read_set, save_write_set);
 
1185
  assert(mrr_buf_desc == NULL);
1183
1186
  if (mrr_buf_desc)
1184
1187
    free(mrr_buf_desc);
1185
 
  return;
1186
1188
}
1187
1189
 
1188
1190
 
6776
6778
  range->min_keypart_map= range->max_keypart_map=
6777
6779
    make_prev_keypart_map(ref->key_parts);
6778
6780
  range->flag= ((ref->key_length == key_info->key_length &&
6779
 
                 key_info->flags == 0) ? EQ_RANGE : 0);
 
6781
                 (key_info->flags & HA_END_SPACE_KEY) == 0) ? EQ_RANGE : 0);
 
6782
 
6780
6783
 
6781
6784
  if (!(quick->key_parts=key_part=(KEY_PART *)
6782
6785
        alloc_root(&quick->alloc,sizeof(KEY_PART)*ref->key_parts)))
7237
7240
 
7238
7241
 
7239
7242
/*
7240
 
  MRR range sequence interface: array<QUICK_RANGE> impl: utility func for NDB
7241
 
 
7242
 
  SYNOPSIS
7243
 
    mrr_persistent_flag_storage()
7244
 
      seq  Range sequence being traversed
7245
 
      idx  Number of range
7246
 
 
7247
 
  DESCRIPTION
7248
 
    MRR/NDB implementation needs to store some bits for each range. This
7249
 
    function returns a reference to the "range_flag" associated with the
7250
 
    range number idx.
7251
 
 
7252
 
    This function should be removed when we get a proper MRR/NDB
7253
 
    implementation.
7254
 
 
7255
 
  RETURN
7256
 
    Reference to range_flag associated with range number #idx
7257
 
*/
7258
 
 
7259
 
uint16_t &mrr_persistent_flag_storage(range_seq_t seq, uint32_t idx)
7260
 
{
7261
 
  QUICK_RANGE_SEQ_CTX *ctx= (QUICK_RANGE_SEQ_CTX*)seq;
7262
 
  return ctx->first[idx]->flag;
7263
 
}
7264
 
 
7265
 
 
7266
 
/*
7267
 
  MRR range sequence interface: array<QUICK_RANGE> impl: utility func for NDB
7268
 
 
7269
 
  SYNOPSIS
7270
 
    mrr_get_ptr_by_idx()
7271
 
      seq  Range sequence bening traversed
7272
 
      idx  Number of the range
7273
 
 
7274
 
  DESCRIPTION
7275
 
    An extension of MRR range sequence interface needed by NDB: return the
7276
 
    data associated with the given range.
7277
 
 
7278
 
    A proper MRR interface implementer is supposed to store and return
7279
 
    range-associated data. NDB stores number of the range instead. So this
7280
 
    is a helper function that translates range number to range associated
7281
 
    data.
7282
 
 
7283
 
    This function does nothing, as currrently there is only one user of the
7284
 
    MRR interface - the quick range select code, and this user doesn't need
7285
 
    to use range-associated data.
7286
 
 
7287
 
  RETURN
7288
 
    Reference to range-associated data
7289
 
*/
7290
 
 
7291
 
char* &mrr_get_ptr_by_idx(range_seq_t, uint32_t)
7292
 
{
7293
 
  static char *dummy;
7294
 
  return dummy;
7295
 
}
7296
 
 
7297
 
 
7298
 
/*
7299
7243
  Get next possible record using quick-struct.
7300
7244
 
7301
7245
  SYNOPSIS