~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Brian Aker
  • Date: 2009-08-03 19:04:48 UTC
  • mto: (1039.102.2 merge)
  • mto: This revision was merged to the branch mainline in revision 1081.
  • Revision ID: brian@gaz-20090803190448-3arnzjk5v1takajm
Remove Insane Clown Posse (AKA... ICP...just generates bugs).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3407
3407
 
3408
3408
        prebuilt->templ_contains_blob = FALSE;
3409
3409
 
3410
 
       /*
3411
 
          Setup index condition pushdown (note: we don't need to check if
3412
 
          this is a scan on primary key as that is checked in idx_cond_push)
3413
 
        */
3414
 
        if (file->active_index == file->pushed_idx_cond_keyno &&
3415
 
            file->active_index != MAX_KEY)
3416
 
          do_idx_cond_push= need_second_pass= TRUE;
3417
 
 
3418
3410
        /* 
3419
3411
          Ok, now build an array of mysql_row_templ_struct structures. 
3420
3412
          If index condition pushdown is used, the array is split into two
7068
7060
                case HA_EXTRA_RESET_STATE:
7069
7061
                        reset_template(prebuilt);
7070
7062
 
7071
 
                        /* reset index condition pushdown state */
7072
 
                        pushed_idx_cond= FALSE;
7073
 
                        pushed_idx_cond_keyno= MAX_KEY;
7074
 
                        //in_range_read= FALSE;
 
7063
                        //in_range_read= FALSE;
7075
7064
                        prebuilt->idx_cond_func= NULL;
7076
7065
                        break;
7077
7066
                case HA_EXTRA_NO_KEYREAD:
9177
9166
}
9178
9167
drizzle_declare_plugin_end;
9179
9168
 
9180
 
 
9181
 
/**
9182
 
 * Index Condition Pushdown interface implementation
9183
 
 */
9184
 
 
9185
 
#ifdef __cplusplus
9186
 
extern "C" {
9187
 
#endif
9188
 
 
9189
 
/* Index condition check function to be called from within Innobase */
9190
 
int64_t index_cond_func_innodb(void *arg)
9191
 
{
9192
 
  ha_innobase *h= (ha_innobase*)arg;
9193
 
  if (h->end_range) //was: h->in_range_read
9194
 
  {
9195
 
    if (h->compare_key2(h->end_range) > 0)
9196
 
      return 2; /* caller should return HA_ERR_END_OF_FILE already */
9197
 
  }
9198
 
  return h->pushed_idx_cond->val_int();
9199
 
}
9200
 
 
9201
 
#ifdef __cplusplus
9202
 
}
9203
 
#endif
9204
 
 
9205
 
 
9206
 
 
9207
 
Item *ha_innobase::idx_cond_push(uint32_t keyno_arg, Item* idx_cond_arg)
9208
 
{
9209
 
  if (keyno_arg != primary_key)
9210
 
  {
9211
 
    pushed_idx_cond_keyno= keyno_arg;
9212
 
    pushed_idx_cond= idx_cond_arg;
9213
 
    in_range_check_pushed_down= TRUE;
9214
 
    return NULL; /* Table handler will check the entire condition */
9215
 
  }
9216
 
  return idx_cond_arg; /* Table handler will not make any checks */
9217
 
}
9218
 
 
9219
9169
int ha_innobase::read_range_first(const key_range *start_key,
9220
9170
                                  const key_range *end_key,
9221
9171
                                  bool eq_range_arg,