~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

  • Committer: Brian Aker
  • Date: 2011-01-18 07:21:16 UTC
  • mfrom: (2079.3.3 session-fix)
  • Revision ID: brian@tangent.org-20110118072116-nuflltzguzhq9rgg
Merge in update so that test-run.pl runs all of test/suite and fix for
create table like and FK.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
 
232
232
  /* ha_ methods: pubilc wrappers for private virtual API */
233
233
 
234
 
  int ha_open(const TableIdentifier &identifier, int mode, int test_if_locked);
235
 
  int startIndexScan(uint32_t idx, bool sorted);
 
234
  int ha_open(const identifier::Table &identifier, int mode, int test_if_locked);
 
235
  int startIndexScan(uint32_t idx, bool sorted) __attribute__ ((warn_unused_result));
236
236
  int endIndexScan();
237
 
  int startTableScan(bool scan);
 
237
  int startTableScan(bool scan) __attribute__ ((warn_unused_result));
238
238
  int endTableScan();
239
239
  int ha_reset();
240
240
 
248
248
    and doDeleteRecord() below.
249
249
  */
250
250
  int ha_external_lock(Session *session, int lock_type);
251
 
  int insertRecord(unsigned char * buf);
252
 
  int updateRecord(const unsigned char * old_data, unsigned char * new_data);
253
 
  int deleteRecord(const unsigned char * buf);
 
251
  int insertRecord(unsigned char * buf) __attribute__ ((warn_unused_result));
 
252
  int updateRecord(const unsigned char * old_data, unsigned char * new_data) __attribute__ ((warn_unused_result));
 
253
  int deleteRecord(const unsigned char * buf) __attribute__ ((warn_unused_result));
254
254
  void ha_release_auto_increment();
255
255
 
256
256
  /** to be actually called to get 'check()' functionality*/
350
350
                                 const unsigned char * key,
351
351
                                 key_part_map keypart_map,
352
352
                                 enum ha_rkey_function find_flag);
353
 
  virtual int index_next(unsigned char *)
 
353
  virtual int index_next(unsigned char *) __attribute__ ((warn_unused_result))
354
354
   { return  HA_ERR_WRONG_COMMAND; }
355
355
  virtual int index_prev(unsigned char *)
356
356
   { return  HA_ERR_WRONG_COMMAND; }
524
524
  */
525
525
 
526
526
  virtual int open(const char *, int , uint32_t ) { assert(0); return -1; }
527
 
  virtual int doOpen(const TableIdentifier &identifier, int mode, uint32_t test_if_locked);
 
527
  virtual int doOpen(const identifier::Table &identifier, int mode, uint32_t test_if_locked);
528
528
  virtual int doStartIndexScan(uint32_t idx, bool)
529
529
  { active_index= idx; return 0; }
530
530
  virtual int doEndIndexScan() { active_index= MAX_KEY; return 0; }
535
535
    if rnd_init allocates the cursor, second call should position it
536
536
    to the start of the table, no need to deallocate and allocate it again
537
537
  */
538
 
  virtual int doStartTableScan(bool scan)= 0;
 
538
  virtual int doStartTableScan(bool scan) __attribute__ ((warn_unused_result)) = 0;
539
539
  virtual int doEndTableScan() { return 0; }
540
540
  virtual int doInsertRecord(unsigned char *)
541
541
  {
665
665
                         int *timestamps, int *timestamps_with_niladic);
666
666
 
667
667
bool create_table(Session *session,
668
 
                        const TableIdentifier &identifier,
 
668
                        const identifier::Table &identifier,
669
669
                        HA_CREATE_INFO *create_info,
670
670
                        message::Table &table_proto,
671
671
                        AlterInfo *alter_info,
673
673
                        bool is_if_not_exists);
674
674
 
675
675
bool create_table_no_lock(Session *session,
676
 
                                const TableIdentifier &identifier,
 
676
                                const identifier::Table &identifier,
677
677
                                HA_CREATE_INFO *create_info,
678
678
                                message::Table &table_proto,
679
679
                                AlterInfo *alter_info,
681
681
                                bool is_if_not_exists);
682
682
 
683
683
bool create_like_table(Session* session,
684
 
                             const TableIdentifier &destination_identifier,
685
 
                             TableList* table, TableList* src_table,
686
 
                             message::Table &create_table_proto,
687
 
                             bool is_if_not_exists,
688
 
                             bool is_engine_set);
 
684
                       identifier::Table::const_reference destination_identifier,
 
685
                       identifier::Table::const_reference source_identifier,
 
686
                       message::Table &create_table_proto,
 
687
                       bool is_if_not_exists,
 
688
                       bool is_engine_set);
689
689
 
690
690
bool rename_table(Session &session,
691
691
                        plugin::StorageEngine *base,
692
 
                        const TableIdentifier &old_identifier,
693
 
                        const TableIdentifier &new_identifier);
 
692
                        const identifier::Table &old_identifier,
 
693
                        const identifier::Table &new_identifier);
694
694
 
695
695
bool prepare_update(Session *session, TableList *table_list,
696
696
                          Item **conds, uint32_t order_num, Order *order);
723
723
void close_handle_and_leave_table_as_lock(Table *table);
724
724
bool wait_for_tables(Session *session);
725
725
bool table_is_used(Table *table, bool wait_for_name_lock);
726
 
Table *drop_locked_tables(Session *session, const drizzled::TableIdentifier &identifier);
727
 
void abort_locked_tables(Session *session, const drizzled::TableIdentifier &identifier);
 
726
Table *drop_locked_tables(Session *session, const drizzled::identifier::Table &identifier);
 
727
void abort_locked_tables(Session *session, const drizzled::identifier::Table &identifier);
728
728
extern Field *not_found_field;
729
729
extern Field *view_ref_found;
730
730