~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

Merged trunk, fixed some leftover InnoDB ICP code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
  enum {NONE=0, INDEX, RND} inited;
209
209
  bool locked;
210
210
  bool implicit_emptied;                /* Can be !=0 only if HEAP */
211
 
  const Item *pushed_cond;
212
 
 
213
 
  Item *pushed_idx_cond;
214
 
  uint32_t pushed_idx_cond_keyno;  /* The index which the above condition is for */
215
211
 
216
212
  /**
217
213
    next_insert_id is the next value which should be inserted into the
244
240
    ref_length(sizeof(my_off_t)),
245
241
    inited(NONE),
246
242
    locked(false), implicit_emptied(0),
247
 
    pushed_cond(0), pushed_idx_cond(NULL), pushed_idx_cond_keyno(MAX_KEY),
248
243
    next_insert_id(0), insert_id_for_cur_row(0)
249
244
    {}
250
245
  virtual ~handler(void);
633
628
   return memcmp(ref1, ref2, ref_length);
634
629
 }
635
630
 
636
 
 /*
637
 
   Condition pushdown to storage engines
638
 
 */
639
 
 
640
 
 /**
641
 
   Push condition down to the table handler.
642
 
 
643
 
   @param  cond   Condition to be pushed. The condition tree must not be
644
 
                  modified by the by the caller.
645
 
 
646
 
   @return
647
 
     The 'remainder' condition that caller must use to filter out records.
648
 
     NULL means the handler will not return rows that do not match the
649
 
     passed condition.
650
 
 
651
 
   @note
652
 
   The pushed conditions form a stack (from which one can remove the
653
 
   last pushed condition using cond_pop).
654
 
   The table handler filters out rows using (pushed_cond1 AND pushed_cond2
655
 
   AND ... AND pushed_condN)
656
 
   or less restrictive condition, depending on handler's capabilities.
657
 
 
658
 
   handler->ha_reset() call empties the condition stack.
659
 
   Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the
660
 
   condition stack.
661
 
 */
662
 
 virtual const COND *cond_push(const COND *cond) { return cond; }
663
 
 
664
 
 /**
665
 
   Pop the top condition from the condition stack of the handler instance.
666
 
 
667
 
   Pops the top if condition stack, if stack is not empty.
668
 
 */
669
 
 virtual void cond_pop(void) { return; }
670
 
 
671
 
 virtual Item *idx_cond_push(uint32_t, Item *idx_cond)
672
 
 { return idx_cond; }
673
 
 
674
631
  /**
675
632
    Lock table.
676
633
 
987
944
                 List<Item> &values,COND *conds,
988
945
                 uint32_t order_num, order_st *order, ha_rows limit,
989
946
                 enum enum_duplicates handle_duplicates, bool ignore);
990
 
bool mysql_multi_update(Session *session, TableList *table_list,
991
 
                        List<Item> *fields, List<Item> *values,
992
 
                        COND *conds, uint64_t options,
993
 
                        enum enum_duplicates handle_duplicates, bool ignore,
994
 
                        Select_Lex_Unit *unit, Select_Lex *select_lex);
995
947
bool mysql_prepare_insert(Session *session, TableList *table_list, Table *table,
996
948
                          List<Item> &fields, List_item *values,
997
949
                          List<Item> &update_fields,