~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

  • Committer: Stewart Smith
  • Date: 2008-09-25 10:04:06 UTC
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080925100406-hld92f4dr4nuar3a
Move compression functions (compress, uncompress and compressed_length) out into modules and fix test

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
  row to be able to find the row later.
112
112
*/
113
113
#define HA_REC_NOT_IN_SEQ      (1 << 3)
114
 
 
 
114
/* This is now a dead option, just left for compatibility */
 
115
#define HA_CAN_GEOMETRY        (1 << 4)
115
116
/*
116
117
  Reading keys in random order is as fast as reading keys in sort order
117
118
  (Used in records.cc to decide if we should use a record cache and by
131
132
#define HA_REQUIRE_PRIMARY_KEY (1 << 12) /* .. and can't create a hidden one */
132
133
#define HA_STATS_RECORDS_IS_EXACT (1 << 13) /* stats.records is exact */
133
134
/*
 
135
  INSERT_DELAYED only works with handlers that uses MySQL internal table
 
136
  level locks
 
137
*/
 
138
#define HA_CAN_INSERT_DELAYED  (1 << 14)
 
139
/*
134
140
  If we get the primary key columns for free when we do an index read
135
141
  It also implies that we have to retrive the primary key when using
136
142
  position() and rnd_pos().
141
147
  uses a primary key. Without primary key, we can't call position().
142
148
*/ 
143
149
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16) 
 
150
#define HA_CAN_RTREEKEYS       (1 << 17) /* Historical, no longer supported */
144
151
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
145
152
/*
146
153
  The following is we need to a primary key to delete (and update) a row.
148
155
*/
149
156
#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE (1 << 19)
150
157
#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
 
158
#define HA_CAN_FULLTEXT        (1 << 21) /* Historical, no longer supported */
 
159
#define HA_CAN_SQL_HANDLER     (1 << 22) /* Historical, no longer supported */
151
160
#define HA_NO_AUTO_INCREMENT   (1 << 23)
152
161
#define HA_HAS_CHECKSUM        (1 << 24)
153
162
/* Table data are stored in separate files (for lower_case_table_names) */
154
163
#define HA_FILE_BASED          (1 << 26)
 
164
#define HA_NO_VARCHAR          (1 << 27) /* Historical, no longer supported */
 
165
#define HA_CAN_BIT_FIELD       (1 << 28) /* Historical, no longer supported */
155
166
#define HA_NEED_READ_RANGE_BUFFER (1 << 29) /* for read_multi_range */
156
167
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
157
 
#define HA_NO_COPY_ON_ALTER    (INT64_C(1) << 31)
158
 
#define HA_HAS_RECORDS         (INT64_C(1) << 32) /* records() gives exact count*/
159
 
#define HA_MRR_CANT_SORT       (INT64_C(1) << 34)
 
168
#define HA_NO_COPY_ON_ALTER    (1LL << 31)
 
169
#define HA_HAS_RECORDS         (1LL << 32) /* records() gives exact count*/
 
170
/* Has it's own method of binlog logging */
 
171
#define HA_HAS_OWN_BINLOGGING  (1LL << 33) /* Historical, no longer supported */
 
172
#define HA_MRR_CANT_SORT       (1LL << 34)
160
173
 
161
174
/*
162
175
  Engine is capable of row-format and statement-format logging,
163
176
  respectively
164
177
*/
165
 
#define HA_BINLOG_ROW_CAPABLE  (INT64_C(1) << 35)
166
 
#define HA_BINLOG_STMT_CAPABLE (INT64_C(1) << 36)
 
178
#define HA_BINLOG_ROW_CAPABLE  (1LL << 35)
 
179
#define HA_BINLOG_STMT_CAPABLE (1LL << 36)
167
180
 
168
 
#define HA_ONLINE_ALTER        (INT64_C(1) << 37)
 
181
#define HA_ONLINE_ALTER        (1LL << 37)
169
182
 
170
183
/*
171
184
  Set of all binlog flags. Currently only contain the capabilities
281
294
 
282
295
enum legacy_db_type
283
296
{
284
 
  DB_TYPE_UNKNOWN=0,
 
297
  DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
 
298
  DB_TYPE_HASH,DB_TYPE_MISAM,DB_TYPE_PISAM,
 
299
  DB_TYPE_RMS_ISAM, DB_TYPE_HEAP, DB_TYPE_ISAM,
 
300
  DB_TYPE_MRG_ISAM, DB_TYPE_MYISAM, DB_TYPE_MRG_MYISAM,
 
301
  DB_TYPE_BERKELEY_DB, DB_TYPE_INNODB,
 
302
  DB_TYPE_GEMINI, DB_TYPE_NDBCLUSTER,
 
303
  DB_TYPE_EXAMPLE_DB, DB_TYPE_ARCHIVE_DB, DB_TYPE_CSV_DB,
 
304
  DB_TYPE_FEDERATED_DB,
 
305
  DB_TYPE_BLACKHOLE_DB,
 
306
  DB_TYPE_PARTITION_DB,
 
307
  DB_TYPE_BINLOG,
 
308
  DB_TYPE_SOLID,
 
309
  DB_TYPE_PBXT,
 
310
  DB_TYPE_TABLE_FUNCTION,
 
311
  DB_TYPE_MEMCACHE,
 
312
  DB_TYPE_FALCON,
 
313
  DB_TYPE_MARIA,
285
314
  DB_TYPE_FIRST_DYNAMIC=42,
286
315
  DB_TYPE_DEFAULT=127 // Must be last
287
316
};
338
367
#define HA_CREATE_USED_COMMENT          (1L << 16)
339
368
#define HA_CREATE_USED_CONNECTION       (1L << 18)
340
369
#define HA_CREATE_USED_KEY_BLOCK_SIZE   (1L << 19)
 
370
#define HA_CREATE_USED_TRANSACTIONAL    (1L << 20)
341
371
#define HA_CREATE_USED_PAGE_CHECKSUM    (1L << 21)
342
372
#define HA_CREATE_USED_BLOCK_SIZE       (1L << 22)
343
373
 
355
385
#define COMPATIBLE_DATA_NO  1
356
386
 
357
387
typedef bool (*qc_engine_callback)(THD *thd, char *table_key,
358
 
                                      uint32_t key_length,
 
388
                                      uint key_length,
359
389
                                      uint64_t *engine_data);
360
390
 
361
391
/**
417
447
           !memcmp(data, DRIZZLE_XID_PREFIX, DRIZZLE_XID_PREFIX_LEN) ?
418
448
           quick_get_my_xid() : 0;
419
449
  }
420
 
  uint32_t length()
 
450
  uint length()
421
451
  {
422
452
    return sizeof(formatID)+sizeof(gtrid_length)+sizeof(bqual_length)+
423
453
           gtrid_length+bqual_length;
424
454
  }
425
 
  unsigned char *key()
 
455
  uchar *key()
426
456
  {
427
 
    return (unsigned char *)&gtrid_length;
 
457
    return (uchar *)&gtrid_length;
428
458
  }
429
 
  uint32_t key_length()
 
459
  uint key_length()
430
460
  {
431
461
    return sizeof(gtrid_length)+sizeof(bqual_length)+gtrid_length+bqual_length;
432
462
  }
445
475
typedef struct st_table_share TABLE_SHARE;
446
476
struct st_foreign_key_info;
447
477
typedef struct st_foreign_key_info FOREIGN_KEY_INFO;
448
 
typedef bool (stat_print_fn)(THD *thd, const char *type, uint32_t type_len,
449
 
                             const char *file, uint32_t file_len,
450
 
                             const char *status, uint32_t status_len);
 
478
typedef bool (stat_print_fn)(THD *thd, const char *type, uint type_len,
 
479
                             const char *file, uint file_len,
 
480
                             const char *status, uint status_len);
451
481
enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, HA_ENGINE_MUTEX };
452
482
extern st_plugin_int *hton2plugin[MAX_HA];
453
483
 
483
513
 
484
514
   slot number is initialized by MySQL after xxx_init() is called.
485
515
   */
486
 
   uint32_t slot;
 
516
   uint slot;
487
517
   /*
488
518
     to store per-savepoint data storage engine is provided with an area
489
519
     of a requested size (0 is ok here).
493
523
     area and need not be used by storage engine.
494
524
     see binlog_hton and binlog_savepoint_set/rollback for an example.
495
525
   */
496
 
   uint32_t savepoint_offset;
 
526
   uint savepoint_offset;
497
527
   /*
498
528
     handlerton methods:
499
529
 
524
554
   int  (*commit)(handlerton *hton, THD *thd, bool all);
525
555
   int  (*rollback)(handlerton *hton, THD *thd, bool all);
526
556
   int  (*prepare)(handlerton *hton, THD *thd, bool all);
527
 
   int  (*recover)(handlerton *hton, XID *xid_list, uint32_t len);
 
557
   int  (*recover)(handlerton *hton, XID *xid_list, uint len);
528
558
   int  (*commit_by_xid)(handlerton *hton, XID *xid);
529
559
   int  (*rollback_by_xid)(handlerton *hton, XID *xid);
530
560
   void *(*create_cursor_read_view)(handlerton *hton, THD *thd);
543
573
 
544
574
   int (*discover)(handlerton *hton, THD* thd, const char *db, 
545
575
                   const char *name,
546
 
                   unsigned char **frmblob, 
 
576
                   uchar **frmblob, 
547
577
                   size_t *frmlen);
548
578
   int (*table_exists_in_engine)(handlerton *hton, THD* thd, const char *db,
549
579
                                 const char *name);
698
728
    Not-null only if this instance is a part of transaction.
699
729
    May assume a combination of enum values above.
700
730
  */
701
 
  unsigned char       m_flags;
 
731
  uchar       m_flags;
702
732
};
703
733
 
704
734
 
740
770
  uint32_t used_fields;
741
771
  uint32_t key_block_size;
742
772
  uint32_t block_size;
 
773
  SQL_LIST merge_list;
743
774
  handlerton *db_type;
744
775
  enum row_type row_type;
745
 
  uint32_t null_bits;                       /* NULL bits at start of record */
746
 
  uint32_t options;                             /* OR of HA_CREATE_ options */
747
 
  uint32_t extra_size;                      /* length of extra data segment */
 
776
  uint null_bits;                       /* NULL bits at start of record */
 
777
  uint options;                         /* OR of HA_CREATE_ options */
 
778
  uint merge_insert_method;
 
779
  uint extra_size;                      /* length of extra data segment */
 
780
  /* 0 not used, 1 if not transactional, 2 if transactional */
 
781
  enum ha_choice transactional;
748
782
  bool table_existed;                   /* 1 in create if table existed */
749
783
  bool frm_only;                        /* 1 if no ha_create_table() */
750
784
  bool varchar;                         /* 1 if table has a VARCHAR */
754
788
typedef struct st_ha_alter_information
755
789
{
756
790
  KEY  *key_info_buffer;
757
 
  uint32_t key_count;
758
 
  uint32_t index_drop_count;
759
 
  uint32_t *index_drop_buffer;
760
 
  uint32_t index_add_count;
761
 
  uint32_t *index_add_buffer;
 
791
  uint key_count;
 
792
  uint index_drop_count;
 
793
  uint *index_drop_buffer;
 
794
  uint index_add_count;
 
795
  uint *index_add_buffer;
762
796
  void *data;
763
797
} HA_ALTER_INFO;
764
798
 
792
826
  TABLEOP_HOOKS() {}
793
827
  virtual ~TABLEOP_HOOKS() {}
794
828
 
795
 
  inline void prelock(Table **tables, uint32_t count)
 
829
  inline void prelock(Table **tables, uint count)
796
830
  {
797
831
    do_prelock(tables, count);
798
832
  }
799
833
 
800
 
  inline int postlock(Table **tables, uint32_t count)
 
834
  inline int postlock(Table **tables, uint count)
801
835
  {
802
836
    return do_postlock(tables, count);
803
837
  }
804
838
private:
805
839
  /* Function primitive that is called prior to locking tables */
806
840
  virtual void do_prelock(Table **tables __attribute__((unused)),
807
 
                          uint32_t count __attribute__((unused)))
 
841
                          uint count __attribute__((unused)))
808
842
  {
809
843
    /* Default is to do nothing */
810
844
  }
818
852
     @return Error code or zero.
819
853
   */
820
854
  virtual int do_postlock(Table **tables __attribute__((unused)),
821
 
                          uint32_t count __attribute__((unused)))
 
855
                          uint count __attribute__((unused)))
822
856
  {
823
857
    return 0;                           /* Default is to do nothing */
824
858
  }
835
869
{
836
870
  st_ha_check_opt() {}                        /* Remove gcc warning */
837
871
  uint32_t sort_buffer_size;
838
 
  uint32_t flags;       /* isam layer flags (e.g. for myisamchk) */
839
 
  uint32_t sql_flags;   /* sql layer flags - for something myisamchk cannot do */
 
872
  uint flags;       /* isam layer flags (e.g. for myisamchk) */
 
873
  uint sql_flags;   /* sql layer flags - for something myisamchk cannot do */
840
874
  KEY_CACHE *key_cache; /* new key cache when changing key cache */
841
875
  void init();
842
876
} HA_CHECK_OPT;
852
886
 
853
887
typedef struct st_handler_buffer
854
888
{
855
 
  unsigned char *buffer;         /* Buffer one can start using */
856
 
  unsigned char *buffer_end;     /* End of buffer */
857
 
  unsigned char *end_of_used_area;     /* End of area that was used by handler */
 
889
  uchar *buffer;         /* Buffer one can start using */
 
890
  uchar *buffer_end;     /* End of buffer */
 
891
  uchar *end_of_used_area;     /* End of area that was used by handler */
858
892
} HANDLER_BUFFER;
859
893
 
860
894
typedef struct system_status_var SSV;
876
910
    RETURN
877
911
      An opaque value to be used as RANGE_SEQ_IF::next() parameter
878
912
  */
879
 
  range_seq_t (*init)(void *init_params, uint32_t n_ranges, uint32_t flags);
 
913
  range_seq_t (*init)(void *init_params, uint n_ranges, uint flags);
880
914
 
881
915
 
882
916
  /*
891
925
      0 - Ok, the range structure filled with info about the next range
892
926
      1 - No more ranges
893
927
  */
894
 
  uint32_t (*next) (range_seq_t seq, KEY_MULTI_RANGE *range);
 
928
  uint (*next) (range_seq_t seq, KEY_MULTI_RANGE *range);
895
929
} RANGE_SEQ_IF;
896
930
 
897
 
uint16_t &mrr_persistent_flag_storage(range_seq_t seq, uint32_t idx);
898
 
char* &mrr_get_ptr_by_idx(range_seq_t seq, uint32_t idx);
 
931
uint16_t &mrr_persistent_flag_storage(range_seq_t seq, uint idx);
 
932
char* &mrr_get_ptr_by_idx(range_seq_t seq, uint idx);
899
933
 
900
934
class COST_VECT
901
935
1021
1055
  time_t create_time;                   /* When table was created */
1022
1056
  time_t check_time;
1023
1057
  time_t update_time;
1024
 
  uint32_t block_size;                  /* index block size */
 
1058
  uint block_size;                      /* index block size */
1025
1059
 
1026
1060
  ha_statistics():
1027
1061
    data_file_length(0), max_data_file_length(0),
1031
1065
  {}
1032
1066
};
1033
1067
 
1034
 
uint32_t calculate_key_len(Table *, uint, const unsigned char *, key_part_map);
 
1068
uint calculate_key_len(Table *, uint, const uchar *, key_part_map);
1035
1069
/*
1036
1070
  bitmap with first N+1 bits set
1037
1071
  (keypart_map for a key prefix of [0..N] keyparts)
1103
1137
  ha_rows estimation_rows_to_insert;
1104
1138
public:
1105
1139
  handlerton *ht;                 /* storage engine of this handler */
1106
 
  unsigned char *ref;                           /* Pointer to current row */
1107
 
  unsigned char *dup_ref;                       /* Pointer to duplicate row */
 
1140
  uchar *ref;                           /* Pointer to current row */
 
1141
  uchar *dup_ref;                       /* Pointer to duplicate row */
1108
1142
 
1109
1143
  ha_statistics stats;
1110
1144
  /** MultiRangeRead-related members: */
1111
1145
  range_seq_t mrr_iter;    /* Interator to traverse the range sequence */
1112
1146
  RANGE_SEQ_IF mrr_funcs;  /* Range sequence traversal functions */
1113
1147
  HANDLER_BUFFER *multi_range_buffer; /* MRR buffer info */
1114
 
  uint32_t ranges_in_seq; /* Total number of ranges in the traversed sequence */
 
1148
  uint ranges_in_seq; /* Total number of ranges in the traversed sequence */
1115
1149
  /* true <=> source MRR ranges and the output are ordered */
1116
1150
  bool mrr_is_output_sorted;
1117
1151
 
1131
1165
  */
1132
1166
  bool in_range_check_pushed_down;
1133
1167
 
1134
 
  uint32_t errkey;                              /* Last dup key */
1135
 
  uint32_t key_used_on_scan;
1136
 
  uint32_t active_index;
 
1168
  uint errkey;                          /* Last dup key */
 
1169
  uint key_used_on_scan;
 
1170
  uint active_index;
1137
1171
  /** Length of ref (1-8 or the clustered key length) */
1138
 
  uint32_t ref_length;
 
1172
  uint ref_length;
1139
1173
  enum {NONE=0, INDEX, RND} inited;
1140
1174
  bool locked;
1141
1175
  bool implicit_emptied;                /* Can be !=0 only if HEAP */
1142
1176
  const Item *pushed_cond;
1143
1177
 
1144
1178
  Item *pushed_idx_cond;
1145
 
  uint32_t pushed_idx_cond_keyno;  /* The index which the above condition is for */
 
1179
  uint pushed_idx_cond_keyno;  /* The index which the above condition is for */
1146
1180
 
1147
1181
  /**
1148
1182
    next_insert_id is the next value which should be inserted into the
1192
1226
  /* ha_ methods: pubilc wrappers for private virtual API */
1193
1227
 
1194
1228
  int ha_open(Table *table, const char *name, int mode, int test_if_locked);
1195
 
  int ha_index_init(uint32_t idx, bool sorted)
 
1229
  int ha_index_init(uint idx, bool sorted)
1196
1230
  {
1197
1231
    int result;
1198
1232
    assert(inited==NONE);
1235
1269
    and delete_row() below.
1236
1270
  */
1237
1271
  int ha_external_lock(THD *thd, int lock_type);
1238
 
  int ha_write_row(unsigned char * buf);
1239
 
  int ha_update_row(const unsigned char * old_data, unsigned char * new_data);
1240
 
  int ha_delete_row(const unsigned char * buf);
 
1272
  int ha_write_row(uchar * buf);
 
1273
  int ha_update_row(const uchar * old_data, uchar * new_data);
 
1274
  int ha_delete_row(const uchar * buf);
1241
1275
  void ha_release_auto_increment();
1242
1276
 
1243
1277
  int ha_check_for_upgrade(HA_CHECK_OPT *check_opt);
1254
1288
    estimation_rows_to_insert= 0;
1255
1289
    return end_bulk_insert();
1256
1290
  }
1257
 
  int ha_bulk_update_row(const unsigned char *old_data, unsigned char *new_data,
1258
 
                         uint32_t *dup_key_found);
 
1291
  int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
 
1292
                         uint *dup_key_found);
1259
1293
  int ha_delete_all_rows();
1260
1294
  int ha_reset_auto_increment(uint64_t value);
1261
1295
  int ha_optimize(THD* thd, HA_CHECK_OPT* check_opt);
1262
1296
  int ha_analyze(THD* thd, HA_CHECK_OPT* check_opt);
1263
1297
  bool ha_check_and_repair(THD *thd);
1264
 
  int ha_disable_indexes(uint32_t mode);
1265
 
  int ha_enable_indexes(uint32_t mode);
 
1298
  int ha_disable_indexes(uint mode);
 
1299
  int ha_enable_indexes(uint mode);
1266
1300
  int ha_discard_or_import_tablespace(bool discard);
1267
1301
  void ha_prepare_for_alter();
1268
1302
  int ha_rename_table(const char *from, const char *to);
1276
1310
 
1277
1311
  void adjust_next_insert_id_after_explicit_value(uint64_t nr);
1278
1312
  int update_auto_increment();
1279
 
  void print_keydup_error(uint32_t key_nr, const char *msg);
 
1313
  void print_keydup_error(uint key_nr, const char *msg);
1280
1314
  virtual void print_error(int error, myf errflag);
1281
1315
  virtual bool get_error_message(int error, String *buf);
1282
 
  uint32_t get_dup_key(int error);
 
1316
  uint get_dup_key(int error);
1283
1317
  virtual void change_table_ptr(Table *table_arg, TABLE_SHARE *share)
1284
1318
  {
1285
1319
    table= table_arg;
1288
1322
  /* Estimates calculation */
1289
1323
  virtual double scan_time(void)
1290
1324
  { return uint64_t2double(stats.data_file_length) / IO_SIZE + 2; }
1291
 
  virtual double read_time(uint32_t index __attribute__((unused)),
1292
 
                           uint32_t ranges, ha_rows rows)
 
1325
  virtual double read_time(uint index __attribute__((unused)),
 
1326
                           uint ranges, ha_rows rows)
1293
1327
  { return rows2double(ranges+rows); }
1294
1328
 
1295
 
  virtual double index_only_read_time(uint32_t keynr, double records);
 
1329
  virtual double index_only_read_time(uint keynr, double records);
1296
1330
  
1297
 
  virtual ha_rows multi_range_read_info_const(uint32_t keyno, RANGE_SEQ_IF *seq,
 
1331
  virtual ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
1298
1332
                                              void *seq_init_param, 
1299
 
                                              uint32_t n_ranges, uint32_t *bufsz,
1300
 
                                              uint32_t *flags, COST_VECT *cost);
1301
 
  virtual int multi_range_read_info(uint32_t keyno, uint32_t n_ranges, uint32_t keys,
1302
 
                                    uint32_t *bufsz, uint32_t *flags, COST_VECT *cost);
 
1333
                                              uint n_ranges, uint *bufsz,
 
1334
                                              uint *flags, COST_VECT *cost);
 
1335
  virtual int multi_range_read_info(uint keyno, uint n_ranges, uint keys,
 
1336
                                    uint *bufsz, uint *flags, COST_VECT *cost);
1303
1337
  virtual int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
1304
 
                                    uint32_t n_ranges, uint32_t mode,
 
1338
                                    uint n_ranges, uint mode,
1305
1339
                                    HANDLER_BUFFER *buf);
1306
1340
  virtual int multi_range_read_next(char **range_info);
1307
1341
 
1309
1343
  virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; }
1310
1344
  bool has_transactions()
1311
1345
  { return (ha_table_flags() & HA_NO_TRANSACTIONS) == 0; }
1312
 
  virtual uint32_t extra_rec_buf_length() const { return 0; }
 
1346
  virtual uint extra_rec_buf_length() const { return 0; }
1313
1347
 
1314
1348
  /**
1315
1349
    This method is used to analyse the error to see whether the error
1321
1355
    same thing as HA_ERR_FOUND_DUP_KEY but can in some cases lead to
1322
1356
    a slightly different error message.
1323
1357
  */
1324
 
  virtual bool is_fatal_error(int error, uint32_t flags)
 
1358
  virtual bool is_fatal_error(int error, uint flags)
1325
1359
  {
1326
1360
    if (!error ||
1327
1361
        ((flags & HA_CHECK_DUP_KEY) &&
1351
1385
  */
1352
1386
  virtual enum row_type get_row_type() const { return ROW_TYPE_NOT_USED; }
1353
1387
 
1354
 
  virtual const char *index_type(uint32_t key_number __attribute__((unused)))
 
1388
  virtual const char *index_type(uint key_number __attribute__((unused)))
1355
1389
  { assert(0); return "";}
1356
1390
 
1357
1391
 
1363
1397
    as there may be several calls to this routine.
1364
1398
  */
1365
1399
  virtual void column_bitmaps_signal();
1366
 
  uint32_t get_index(void) const { return active_index; }
 
1400
  uint get_index(void) const { return active_index; }
1367
1401
  virtual int close(void)=0;
1368
1402
 
1369
1403
  /**
1387
1421
    @retval  0           Success
1388
1422
    @retval  >0          Error code
1389
1423
  */
1390
 
  virtual int exec_bulk_update(uint32_t *dup_key_found __attribute__((unused)))
 
1424
  virtual int exec_bulk_update(uint *dup_key_found __attribute__((unused)))
1391
1425
  {
1392
1426
    assert(false);
1393
1427
    return HA_ERR_WRONG_COMMAND;
1414
1448
     row if available. If the key value is null, begin at the first key of the
1415
1449
     index.
1416
1450
  */
1417
 
  virtual int index_read_map(unsigned char * buf, const unsigned char * key,
 
1451
  virtual int index_read_map(uchar * buf, const uchar * key,
1418
1452
                             key_part_map keypart_map,
1419
1453
                             enum ha_rkey_function find_flag)
1420
1454
  {
1421
 
    uint32_t key_len= calculate_key_len(table, active_index, key, keypart_map);
 
1455
    uint key_len= calculate_key_len(table, active_index, key, keypart_map);
1422
1456
    return  index_read(buf, key, key_len, find_flag);
1423
1457
  }
1424
1458
  /**
1427
1461
     row if available. If the key value is null, begin at the first key of the
1428
1462
     index.
1429
1463
  */
1430
 
  virtual int index_read_idx_map(unsigned char * buf, uint32_t index, const unsigned char * key,
 
1464
  virtual int index_read_idx_map(uchar * buf, uint index, const uchar * key,
1431
1465
                                 key_part_map keypart_map,
1432
1466
                                 enum ha_rkey_function find_flag);
1433
 
  virtual int index_next(unsigned char * buf __attribute__((unused)))
1434
 
   { return  HA_ERR_WRONG_COMMAND; }
1435
 
  virtual int index_prev(unsigned char * buf __attribute__((unused)))
1436
 
   { return  HA_ERR_WRONG_COMMAND; }
1437
 
  virtual int index_first(unsigned char * buf __attribute__((unused)))
1438
 
   { return  HA_ERR_WRONG_COMMAND; }
1439
 
  virtual int index_last(unsigned char * buf __attribute__((unused)))
1440
 
   { return  HA_ERR_WRONG_COMMAND; }
1441
 
  virtual int index_next_same(unsigned char *buf __attribute__((unused)),
1442
 
                              const unsigned char *key __attribute__((unused)),
1443
 
                              uint32_t keylen __attribute__((unused)));
 
1467
  virtual int index_next(uchar * buf __attribute__((unused)))
 
1468
   { return  HA_ERR_WRONG_COMMAND; }
 
1469
  virtual int index_prev(uchar * buf __attribute__((unused)))
 
1470
   { return  HA_ERR_WRONG_COMMAND; }
 
1471
  virtual int index_first(uchar * buf __attribute__((unused)))
 
1472
   { return  HA_ERR_WRONG_COMMAND; }
 
1473
  virtual int index_last(uchar * buf __attribute__((unused)))
 
1474
   { return  HA_ERR_WRONG_COMMAND; }
 
1475
  virtual int index_next_same(uchar *buf __attribute__((unused)),
 
1476
                              const uchar *key __attribute__((unused)),
 
1477
                              uint keylen __attribute__((unused)));
1444
1478
  /**
1445
1479
     @brief
1446
1480
     The following functions works like index_read, but it find the last
1447
1481
     row with the current key value or prefix.
1448
1482
  */
1449
 
  virtual int index_read_last_map(unsigned char * buf, const unsigned char * key,
 
1483
  virtual int index_read_last_map(uchar * buf, const uchar * key,
1450
1484
                                  key_part_map keypart_map)
1451
1485
  {
1452
 
    uint32_t key_len= calculate_key_len(table, active_index, key, keypart_map);
 
1486
    uint key_len= calculate_key_len(table, active_index, key, keypart_map);
1453
1487
    return index_read_last(buf, key, key_len);
1454
1488
  }
1455
1489
  virtual int read_range_first(const key_range *start_key,
1458
1492
  virtual int read_range_next();
1459
1493
  int compare_key(key_range *range);
1460
1494
  int compare_key2(key_range *range);
1461
 
  virtual int rnd_next(unsigned char *buf __attribute__((unused)))=0;
1462
 
  virtual int rnd_pos(unsigned char * buf __attribute__((unused)),
1463
 
                      unsigned char *pos __attribute__((unused)))=0;
 
1495
  virtual int rnd_next(uchar *buf __attribute__((unused)))=0;
 
1496
  virtual int rnd_pos(uchar * buf __attribute__((unused)),
 
1497
                      uchar *pos __attribute__((unused)))=0;
1464
1498
  /**
1465
1499
    One has to use this method when to find
1466
1500
    random position by record as the plain
1467
1501
    position() call doesn't work for some
1468
1502
    handlers for random position.
1469
1503
  */
1470
 
  virtual int rnd_pos_by_record(unsigned char *record);
1471
 
  virtual int read_first_row(unsigned char *buf, uint32_t primary_key);
 
1504
  virtual int rnd_pos_by_record(uchar *record);
 
1505
  virtual int read_first_row(uchar *buf, uint primary_key);
1472
1506
  /**
1473
1507
    The following function is only needed for tables that may be temporary
1474
1508
    tables during joins.
1475
1509
  */
1476
 
  virtual int restart_rnd_next(unsigned char *buf __attribute__((unused)),
1477
 
                               unsigned char *pos __attribute__((unused)))
1478
 
    { return HA_ERR_WRONG_COMMAND; }
1479
 
  virtual int rnd_same(unsigned char *buf __attribute__((unused)),
1480
 
                       uint32_t inx __attribute__((unused)))
1481
 
    { return HA_ERR_WRONG_COMMAND; }
1482
 
  virtual ha_rows records_in_range(uint32_t inx __attribute__((unused)),
 
1510
  virtual int restart_rnd_next(uchar *buf __attribute__((unused)),
 
1511
                               uchar *pos __attribute__((unused)))
 
1512
    { return HA_ERR_WRONG_COMMAND; }
 
1513
  virtual int rnd_same(uchar *buf __attribute__((unused)),
 
1514
                       uint inx __attribute__((unused)))
 
1515
    { return HA_ERR_WRONG_COMMAND; }
 
1516
  virtual ha_rows records_in_range(uint inx __attribute__((unused)),
1483
1517
                                   key_range *min_key __attribute__((unused)),
1484
1518
                                   key_range *max_key __attribute__((unused)))
1485
1519
    { return (ha_rows) 10; }
1486
 
  virtual void position(const unsigned char *record)=0;
 
1520
  virtual void position(const uchar *record)=0;
1487
1521
  virtual int info(uint)=0; // see my_base.h for full description
1488
1522
  virtual uint32_t calculate_key_hash_value(Field **field_array __attribute__((unused)))
1489
1523
  { assert(0); return 0; }
1563
1597
    @retval   true            Foreign key defined on table or index
1564
1598
    @retval   false           No foreign key defined
1565
1599
  */
1566
 
  virtual bool is_fk_defined_on_table_or_index(uint32_t index __attribute__((unused)))
 
1600
  virtual bool is_fk_defined_on_table_or_index(uint index __attribute__((unused)))
1567
1601
  { return false; }
1568
1602
  virtual char* get_foreign_key_create_info(void)
1569
1603
  { return(NULL);}  /* gets foreign key create string from InnoDB */
1573
1607
  virtual int get_foreign_key_list(THD *thd __attribute__((unused)),
1574
1608
                                   List<FOREIGN_KEY_INFO> *f_key_list __attribute__((unused)))
1575
1609
  { return 0; }
1576
 
  virtual uint32_t referenced_by_foreign_key() { return 0;}
 
1610
  virtual uint referenced_by_foreign_key() { return 0;}
1577
1611
  virtual void init_table_handle_for_HANDLER()
1578
1612
  { return; }       /* prepare InnoDB for HANDLER */
1579
1613
  virtual void free_foreign_key_create_info(char* str __attribute__((unused))) {}
1594
1628
 
1595
1629
  virtual int get_default_no_partitions(HA_CREATE_INFO *info __attribute__((unused))) { return 1;}
1596
1630
  virtual bool get_no_parts(const char *name __attribute__((unused)),
1597
 
                            uint32_t *no_parts)
 
1631
                            uint *no_parts)
1598
1632
  {
1599
1633
    *no_parts= 0;
1600
1634
    return 0;
1601
1635
  }
1602
1636
 
1603
 
  virtual uint32_t index_flags(uint32_t idx, uint32_t part, bool all_parts) const =0;
 
1637
  virtual uint32_t index_flags(uint idx, uint part, bool all_parts) const =0;
1604
1638
 
1605
1639
  virtual int add_index(Table *table_arg __attribute__((unused)),
1606
1640
                        KEY *key_info __attribute__((unused)),
1607
 
                        uint32_t num_of_keys __attribute__((unused)))
 
1641
                        uint num_of_keys __attribute__((unused)))
1608
1642
  { return (HA_ERR_WRONG_COMMAND); }
1609
1643
  virtual int prepare_drop_index(Table *table_arg __attribute__((unused)),
1610
 
                                 uint32_t *key_num __attribute__((unused)),
1611
 
                                 uint32_t num_of_keys __attribute__((unused)))
 
1644
                                 uint *key_num __attribute__((unused)),
 
1645
                                 uint num_of_keys __attribute__((unused)))
1612
1646
  { return (HA_ERR_WRONG_COMMAND); }
1613
1647
  virtual int final_drop_index(Table *table_arg __attribute__((unused)))
1614
1648
  { return (HA_ERR_WRONG_COMMAND); }
1615
1649
 
1616
 
  uint32_t max_record_length() const
1617
 
  { return cmin((unsigned int)HA_MAX_REC_LENGTH, max_supported_record_length()); }
1618
 
  uint32_t max_keys() const
1619
 
  { return cmin((unsigned int)MAX_KEY, max_supported_keys()); }
1620
 
  uint32_t max_key_parts() const
1621
 
  { return cmin((unsigned int)MAX_REF_PARTS, max_supported_key_parts()); }
1622
 
  uint32_t max_key_length() const
1623
 
  { return cmin((unsigned int)MAX_KEY_LENGTH, max_supported_key_length()); }
1624
 
  uint32_t max_key_part_length(void) const
1625
 
  { return cmin((unsigned int)MAX_KEY_LENGTH, max_supported_key_part_length()); }
 
1650
  uint max_record_length() const
 
1651
  { return min((unsigned int)HA_MAX_REC_LENGTH, max_supported_record_length()); }
 
1652
  uint max_keys() const
 
1653
  { return min((unsigned int)MAX_KEY, max_supported_keys()); }
 
1654
  uint max_key_parts() const
 
1655
  { return min((unsigned int)MAX_REF_PARTS, max_supported_key_parts()); }
 
1656
  uint max_key_length() const
 
1657
  { return min((unsigned int)MAX_KEY_LENGTH, max_supported_key_length()); }
 
1658
  uint max_key_part_length(void) const
 
1659
  { return min((unsigned int)MAX_KEY_LENGTH, max_supported_key_part_length()); }
1626
1660
 
1627
 
  virtual uint32_t max_supported_record_length(void) const
 
1661
  virtual uint max_supported_record_length(void) const
1628
1662
  { return HA_MAX_REC_LENGTH; }
1629
 
  virtual uint32_t max_supported_keys(void) const { return 0; }
1630
 
  virtual uint32_t max_supported_key_parts(void) const { return MAX_REF_PARTS; }
1631
 
  virtual uint32_t max_supported_key_length(void) const { return MAX_KEY_LENGTH; }
1632
 
  virtual uint32_t max_supported_key_part_length(void) const { return 255; }
1633
 
  virtual uint32_t min_record_length(uint32_t options __attribute__((unused))) const
 
1663
  virtual uint max_supported_keys(void) const { return 0; }
 
1664
  virtual uint max_supported_key_parts(void) const { return MAX_REF_PARTS; }
 
1665
  virtual uint max_supported_key_length(void) const { return MAX_KEY_LENGTH; }
 
1666
  virtual uint max_supported_key_part_length(void) const { return 255; }
 
1667
  virtual uint min_record_length(uint options __attribute__((unused))) const
1634
1668
  { return 1; }
1635
1669
 
1636
1670
  virtual bool low_byte_first(void) const { return 1; }
1637
 
  virtual uint32_t checksum(void) const { return 0; }
 
1671
  virtual uint checksum(void) const { return 0; }
1638
1672
  virtual bool is_crashed(void) const  { return 0; }
1639
1673
  virtual bool auto_repair(void) const { return 0; }
1640
1674
 
1647
1681
  /**
1648
1682
    @note lock_count() can return > 1 if the table is MERGE or partitioned.
1649
1683
  */
1650
 
  virtual uint32_t lock_count(void) const { return 1; }
 
1684
  virtual uint lock_count(void) const { return 1; }
1651
1685
  /**
1652
1686
    Is not invoked for non-transactional temporary tables.
1653
1687
 
1702
1736
  virtual bool
1703
1737
    register_query_cache_table(THD *thd __attribute__((unused)),
1704
1738
                               char *table_key __attribute__((unused)),
1705
 
                               uint32_t key_length __attribute__((unused)),
 
1739
                               uint key_length __attribute__((unused)),
1706
1740
                               qc_engine_callback *engine_callback,
1707
1741
                               uint64_t *engine_data __attribute__((unused)))
1708
1742
  {
1717
1751
   @retval false  otherwise
1718
1752
 */
1719
1753
 virtual bool primary_key_is_clustered() { return false; }
1720
 
 virtual int cmp_ref(const unsigned char *ref1, const unsigned char *ref2)
 
1754
 virtual int cmp_ref(const uchar *ref1, const uchar *ref2)
1721
1755
 {
1722
1756
   return memcmp(ref1, ref2, ref_length);
1723
1757
 }
1758
1792
 virtual void cond_pop(void) { return; }
1759
1793
 
1760
1794
 virtual Item
1761
 
   *idx_cond_push(uint32_t keyno __attribute__((unused)),
 
1795
   *idx_cond_push(uint keyno __attribute__((unused)),
1762
1796
                  Item* idx_cond __attribute__((unused)))
1763
1797
 { return idx_cond; }
1764
1798
 
1767
1801
  */
1768
1802
 virtual bool
1769
1803
   check_if_incompatible_data(HA_CREATE_INFO *create_info __attribute__((unused)),
1770
 
                              uint32_t table_changes __attribute__((unused)))
 
1804
                              uint table_changes __attribute__((unused)))
1771
1805
 { return COMPATIBLE_DATA_NO; }
1772
1806
 
1773
1807
 /* On-line ALTER Table interface */
1799
1833
   check_if_supported_alter(Table *altered_table __attribute__((unused)),
1800
1834
                            HA_CREATE_INFO *create_info,
1801
1835
                            HA_ALTER_FLAGS *alter_flags __attribute__((unused)),
1802
 
                            uint32_t table_changes)
 
1836
                            uint table_changes)
1803
1837
 {
1804
1838
   if (this->check_if_incompatible_data(create_info, table_changes)
1805
1839
       == COMPATIBLE_DATA_NO)
1935
1969
    the corresponding 'ha_*' method above.
1936
1970
  */
1937
1971
 
1938
 
  virtual int open(const char *name, int mode, uint32_t test_if_locked)=0;
1939
 
  virtual int index_init(uint32_t idx,
 
1972
  virtual int open(const char *name, int mode, uint test_if_locked)=0;
 
1973
  virtual int index_init(uint idx,
1940
1974
                         bool sorted __attribute__((unused)))
1941
1975
  { active_index= idx; return 0; }
1942
1976
  virtual int index_end() { active_index= MAX_KEY; return 0; }
1949
1983
  */
1950
1984
  virtual int rnd_init(bool scan)= 0;
1951
1985
  virtual int rnd_end() { return 0; }
1952
 
  virtual int write_row(unsigned char *buf __attribute__((unused)))
1953
 
  {
1954
 
    return HA_ERR_WRONG_COMMAND;
1955
 
  }
1956
 
 
1957
 
  virtual int update_row(const unsigned char *old_data __attribute__((unused)),
1958
 
                         unsigned char *new_data __attribute__((unused)))
1959
 
  {
1960
 
    return HA_ERR_WRONG_COMMAND;
1961
 
  }
1962
 
 
1963
 
  virtual int delete_row(const unsigned char *buf __attribute__((unused)))
 
1986
  virtual int write_row(uchar *buf __attribute__((unused)))
 
1987
  {
 
1988
    return HA_ERR_WRONG_COMMAND;
 
1989
  }
 
1990
 
 
1991
  virtual int update_row(const uchar *old_data __attribute__((unused)),
 
1992
                         uchar *new_data __attribute__((unused)))
 
1993
  {
 
1994
    return HA_ERR_WRONG_COMMAND;
 
1995
  }
 
1996
 
 
1997
  virtual int delete_row(const uchar *buf __attribute__((unused)))
1964
1998
  {
1965
1999
    return HA_ERR_WRONG_COMMAND;
1966
2000
  }
2018
2052
  virtual void start_bulk_insert(ha_rows rows __attribute__((unused)))
2019
2053
  {}
2020
2054
  virtual int end_bulk_insert(void) { return 0; }
2021
 
  virtual int index_read(unsigned char * buf __attribute__((unused)),
2022
 
                         const unsigned char * key __attribute__((unused)),
2023
 
                         uint32_t key_len __attribute__((unused)),
 
2055
  virtual int index_read(uchar * buf __attribute__((unused)),
 
2056
                         const uchar * key __attribute__((unused)),
 
2057
                         uint key_len __attribute__((unused)),
2024
2058
                         enum ha_rkey_function find_flag __attribute__((unused)))
2025
2059
   { return  HA_ERR_WRONG_COMMAND; }
2026
 
  virtual int index_read_last(unsigned char * buf __attribute__((unused)),
2027
 
                              const unsigned char * key __attribute__((unused)),
2028
 
                              uint32_t key_len __attribute__((unused)))
 
2060
  virtual int index_read_last(uchar * buf __attribute__((unused)),
 
2061
                              const uchar * key __attribute__((unused)),
 
2062
                              uint key_len __attribute__((unused)))
2029
2063
   { return (my_errno= HA_ERR_WRONG_COMMAND); }
2030
2064
  /**
2031
2065
    This method is similar to update_row, however the handler doesn't need
2040
2074
    @retval  0   Bulk delete used by handler
2041
2075
    @retval  1   Bulk delete not used, normal operation used
2042
2076
  */
2043
 
  virtual int bulk_update_row(const unsigned char *old_data __attribute__((unused)),
2044
 
                              unsigned char *new_data __attribute__((unused)),
2045
 
                              uint32_t *dup_key_found __attribute__((unused)))
 
2077
  virtual int bulk_update_row(const uchar *old_data __attribute__((unused)),
 
2078
                              uchar *new_data __attribute__((unused)),
 
2079
                              uint *dup_key_found __attribute__((unused)))
2046
2080
  {
2047
2081
    assert(false);
2048
2082
    return HA_ERR_WRONG_COMMAND;
2071
2105
  { return HA_ADMIN_NOT_IMPLEMENTED; }
2072
2106
  virtual bool check_and_repair(THD *thd __attribute__((unused)))
2073
2107
  { return true; }
2074
 
  virtual int disable_indexes(uint32_t mode __attribute__((unused)))
 
2108
  virtual int disable_indexes(uint mode __attribute__((unused)))
2075
2109
  { return HA_ERR_WRONG_COMMAND; }
2076
 
  virtual int enable_indexes(uint32_t mode __attribute__((unused)))
 
2110
  virtual int enable_indexes(uint mode __attribute__((unused)))
2077
2111
  { return HA_ERR_WRONG_COMMAND; }
2078
2112
  virtual int discard_or_import_tablespace(bool discard __attribute__((unused)))
2079
2113
  { return (my_errno=HA_ERR_WRONG_COMMAND); }
2120
2154
  handler *h2;
2121
2155
 
2122
2156
  /* Buffer to store rowids, or (rowid, range_id) pairs */
2123
 
  unsigned char *rowids_buf;
2124
 
  unsigned char *rowids_buf_cur;   /* Current position when reading/writing */
2125
 
  unsigned char *rowids_buf_last;  /* When reading: end of used buffer space */
2126
 
  unsigned char *rowids_buf_end;   /* End of the buffer */
 
2157
  uchar *rowids_buf;
 
2158
  uchar *rowids_buf_cur;   /* Current position when reading/writing */
 
2159
  uchar *rowids_buf_last;  /* When reading: end of used buffer space */
 
2160
  uchar *rowids_buf_end;   /* End of the buffer */
2127
2161
 
2128
2162
  bool dsmrr_eof; /* true <=> We have reached EOF when reading index tuples */
2129
2163
 
2138
2172
    table= table_arg;
2139
2173
  }
2140
2174
  int dsmrr_init(handler *h, KEY *key, RANGE_SEQ_IF *seq_funcs, 
2141
 
                 void *seq_init_param, uint32_t n_ranges, uint32_t mode, 
 
2175
                 void *seq_init_param, uint n_ranges, uint mode, 
2142
2176
                 HANDLER_BUFFER *buf);
2143
2177
  void dsmrr_close();
2144
2178
  int dsmrr_fill_buffer(handler *h);
2145
2179
  int dsmrr_next(handler *h, char **range_info);
2146
2180
 
2147
 
  int dsmrr_info(uint32_t keyno, uint32_t n_ranges, uint32_t keys, uint32_t *bufsz,
2148
 
                 uint32_t *flags, COST_VECT *cost);
 
2181
  int dsmrr_info(uint keyno, uint n_ranges, uint keys, uint *bufsz,
 
2182
                 uint *flags, COST_VECT *cost);
2149
2183
 
2150
 
  ha_rows dsmrr_info_const(uint32_t keyno, RANGE_SEQ_IF *seq, 
2151
 
                            void *seq_init_param, uint32_t n_ranges, uint32_t *bufsz,
2152
 
                            uint32_t *flags, COST_VECT *cost);
 
2184
  ha_rows dsmrr_info_const(uint keyno, RANGE_SEQ_IF *seq, 
 
2185
                            void *seq_init_param, uint n_ranges, uint *bufsz,
 
2186
                            uint *flags, COST_VECT *cost);
2153
2187
private:
2154
 
  bool key_uses_partial_cols(uint32_t keyno);
2155
 
  bool choose_mrr_impl(uint32_t keyno, ha_rows rows, uint32_t *flags, uint32_t *bufsz, 
 
2188
  bool key_uses_partial_cols(uint keyno);
 
2189
  bool choose_mrr_impl(uint keyno, ha_rows rows, uint *flags, uint *bufsz, 
2156
2190
                       COST_VECT *cost);
2157
 
  bool get_disk_sweep_mrr_cost(uint32_t keynr, ha_rows rows, uint32_t flags, 
2158
 
                               uint32_t *buffer_size, COST_VECT *cost);
 
2191
  bool get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags, 
 
2192
                               uint *buffer_size, COST_VECT *cost);
2159
2193
};
2160
2194
 
2161
2195
extern const char *ha_row_type[];
2225
2259
/* discovery */
2226
2260
int ha_create_table_from_engine(THD* thd, const char *db, const char *name);
2227
2261
int ha_discover(THD* thd, const char* dbname, const char* name,
2228
 
                unsigned char** frmblob, size_t* frmlen);
 
2262
                uchar** frmblob, size_t* frmlen);
2229
2263
int ha_find_files(THD *thd,const char *db,const char *path,
2230
2264
                  const char *wild, bool dir, List<LEX_STRING>* files);
2231
2265
int ha_table_exists_in_engine(THD* thd, const char* db, const char* name);
2268
2302
*/
2269
2303
#define trans_need_2pc(thd, all)                   ((total_ha_2pc > 1) && \
2270
2304
        !((all ? &thd->transaction.all : &thd->transaction.stmt)->no_2pc))
 
2305
 
 
2306
#ifdef HAVE_NDB_BINLOG
 
2307
int ha_reset_logs(THD *thd);
 
2308
int ha_binlog_index_purge_file(THD *thd, const char *file);
 
2309
void ha_reset_slave(THD *thd);
 
2310
void ha_binlog_log_query(THD *thd, handlerton *db_type,
 
2311
                         enum_binlog_command binlog_command,
 
2312
                         const char *query, uint query_length,
 
2313
                         const char *db, const char *table_name);
 
2314
void ha_binlog_wait(THD *thd);
 
2315
int ha_binlog_end(THD *thd);
 
2316
#else
 
2317
#define ha_reset_logs(a) do {} while (0)
 
2318
#define ha_binlog_index_purge_file(a,b) do {} while (0)
 
2319
#define ha_reset_slave(a) do {} while (0)
 
2320
#define ha_binlog_log_query(a,b,c,d,e,f,g) do {} while (0)
 
2321
#define ha_binlog_wait(a) do {} while (0)
 
2322
#define ha_binlog_end(a)  do {} while (0)
 
2323
#endif