376
376
#define READING_NEXT 1
377
377
#define READING_HEADER 2
379
380
#define mi_getint(x) ((uint) mi_uint2korr(x) & 32767)
380
381
#define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\
381
382
mi_int2store(x,boh); }
382
383
#define mi_test_if_nod(x) (x[0] & 128 ? info->s->base.key_reflength : 0)
383
384
#define mi_report_crashed(A, B) _mi_report_crashed((A), (B), __FILE__, __LINE__)
384
385
#define mi_mark_crashed(x) do{(x)->s->state.changed|= STATE_CRASHED; \
385
DBUG_PRINT("error", ("Marked table crashed")); \
386
386
mi_report_crashed((x), 0); \
388
388
#define mi_mark_crashed_on_repair(x) do{(x)->s->state.changed|= \
389
389
STATE_CRASHED|STATE_CRASHED_ON_REPAIR; \
390
390
(x)->update|= HA_STATE_CHANGED; \
391
DBUG_PRINT("error", \
392
("Marked table crashed")); \
394
392
#define mi_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
395
393
#define mi_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
396
394
#define mi_print_error(SHARE, ERRNO) \
397
395
mi_report_error((ERRNO), (SHARE)->index_file_name)
400
void _mi_report_crashed(MI_INFO *file __attribute__((unused)),
401
const char *message __attribute__((unused)),
402
const char *sfile __attribute__((unused)),
403
uint sline __attribute__((unused)));
405
397
/* Functions to store length of space packed keys, VARCHAR or BLOB keys */
407
399
#define store_key_length(key,length) \
780
772
/* Needed for handler */
781
773
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
774
void _mi_report_crashed(MI_INFO *file __attribute__((unused)),
775
const char *message __attribute__((unused)),
776
const char *sfile __attribute__((unused)),
777
uint sline __attribute__((unused)));
782
779
#ifdef __cplusplus