~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
/* Definitions for parameters to do with Cursor-routines */
28
28
 
29
 
#include <mysys/thr_lock.h>
30
 
#include <mysys/hash.h>
 
29
#include <drizzled/thr_lock.h>
31
30
#include <drizzled/sql_string.h>
32
31
#include <drizzled/sql_list.h>
33
32
#include <drizzled/plugin/storage_engine.h>
162
161
  must be set to 0.
163
162
*/
164
163
 
165
 
class Cursor :public Sql_alloc
 
164
class Cursor :public drizzled::memory::SqlAlloc
166
165
{
167
166
protected:
168
167
  TableShare *table_share;   /* The table definition */
237
236
  */
238
237
  Discrete_interval auto_inc_interval_for_cur_row;
239
238
 
240
 
  Cursor(drizzled::plugin::StorageEngine &engine_arg, TableShare &share_arg)
241
 
    :table_share(&share_arg), table(0),
242
 
    estimation_rows_to_insert(0), engine(&engine_arg),
243
 
    ref(0), in_range_check_pushed_down(false),
244
 
    key_used_on_scan(MAX_KEY), active_index(MAX_KEY),
245
 
    ref_length(sizeof(my_off_t)),
246
 
    inited(NONE),
247
 
    locked(false), implicit_emptied(0),
248
 
    next_insert_id(0), insert_id_for_cur_row(0)
249
 
    {}
 
239
  Cursor(drizzled::plugin::StorageEngine &engine_arg, TableShare &share_arg);
250
240
  virtual ~Cursor(void);
251
 
  virtual Cursor *clone(MEM_ROOT *mem_root);
 
241
  virtual Cursor *clone(drizzled::memory::Root *mem_root);
252
242
 
253
243
  /* ha_ methods: pubilc wrappers for private virtual API */
254
244
 
645
635
                         uint32_t, enum ha_rkey_function)
646
636
   { return  HA_ERR_WRONG_COMMAND; }
647
637
  virtual int index_read_last(unsigned char *, const unsigned char *, uint32_t)
648
 
   { return (my_errno= HA_ERR_WRONG_COMMAND); }
 
638
   { return (errno= HA_ERR_WRONG_COMMAND); }
649
639
  /**
650
640
    This is called to delete all rows in a table
651
641
    If the Cursor don't support this, then this function will
653
643
    by one.
654
644
  */
655
645
  virtual int delete_all_rows(void)
656
 
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
 
646
  { return (errno=HA_ERR_WRONG_COMMAND); }
657
647
  /**
658
648
    Reset the auto-increment counter to the given value, i.e. the next row
659
649
    inserted will get the given value. This is called e.g. after TRUNCATE
673
663
  { return HA_ERR_WRONG_COMMAND; }
674
664
 
675
665
  virtual int discard_or_import_tablespace(bool)
676
 
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
 
666
  { return (errno=HA_ERR_WRONG_COMMAND); }
677
667
 
678
668
  /* 
679
669
    @todo this is just for the HEAP engine, it should
685
675
};
686
676
 
687
677
extern const char *ha_row_type[];
688
 
extern const char *tx_isolation_names[];
689
678
extern const char *binlog_format_names[];
690
 
extern TYPELIB tx_isolation_typelib;
691
679
extern uint32_t total_ha, total_ha_2pc;
692
680
 
693
681
       /* Wrapper functions */
743
731
 
744
732
bool handle_select(Session *session, LEX *lex, select_result *result,
745
733
                   uint64_t setup_tables_done_option);
746
 
bool mysql_select(Session *session, Item ***rref_pointer_array,
747
 
                  TableList *tables, uint32_t wild_num,  List<Item> &list,
748
 
                  COND *conds, uint32_t og_num, order_st *order, order_st *group,
749
 
                  Item *having, uint64_t select_type,
750
 
                  select_result *result, Select_Lex_Unit *unit,
751
 
                  Select_Lex *select_lex);
752
734
void free_underlaid_joins(Session *session, Select_Lex *select);
753
 
bool mysql_explain_union(Session *session, Select_Lex_Unit *unit,
754
 
                         select_result *result);
755
 
int mysql_explain_select(Session *session, Select_Lex *sl, char const *type,
756
 
                         select_result *result);
757
735
 
758
736
bool mysql_handle_derived(LEX *lex, bool (*processor)(Session *session,
759
737
                                                      LEX *lex,