~drizzle-developers/ubuntu/natty/drizzle/natty

« back to all changes in this revision

Viewing changes to drizzled/base.h

  • Committer: Monty Taylor
  • Date: 2010-03-03 19:27:30 UTC
  • mto: (1308.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1278.
  • Revision ID: mordred@inaugust.com-20100303192730-o2o3nmp0lzhuatbe
Tags: upstream-2010.03.1317
ImportĀ upstreamĀ versionĀ 2010.03.1317

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#ifndef DRIZZLED_BASE_H
29
29
#define DRIZZLED_BASE_H
30
30
 
 
31
namespace drizzled
 
32
{
 
33
 
31
34
/* The following is bits in the flag parameter to ha_open() */
32
35
 
33
36
#define HA_OPEN_ABORT_IF_LOCKED         0       /* default */
198
201
  HA_KEYTYPE_VARBINARY2=18              /* Key is sorted as unsigned chars */
199
202
};
200
203
 
201
 
#define HA_MAX_KEYTYPE  31              /* Must be log2-1 */
202
 
 
203
204
        /* These flags kan be OR:ed to key-flag */
204
205
 
205
206
#define HA_NOSAME                1      /* Set if not dupplicated records */
210
211
#define HA_NULL_ARE_EQUAL       2048    /* NULL in key are cmp as equal */
211
212
#define HA_GENERATED_KEY        8192    /* Automaticly generated key */
212
213
 
213
 
        /* The combination of the above can be used for key type comparison. */
214
 
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
215
 
                         HA_BINARY_PACK_KEY | HA_UNIQUE_CHECK | \
216
 
                         HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
217
 
 
218
214
#define HA_KEY_HAS_PART_KEY_SEG 65536   /* Key contains partial segments */
219
215
 
220
216
        /* Automatic bits in key-flag */
410
406
#define MBR_WITHIN      2048
411
407
#define MBR_DISJOINT    4096
412
408
#define MBR_EQUAL       8192
413
 
#define MBR_DATA        16384
414
409
#define SEARCH_NULL_ARE_EQUAL 32768     /* NULL in keys are equal */
415
410
#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */
416
411
 
417
412
        /* bits in opt_flag */
418
 
#define QUICK_USED      1
419
413
#define READ_CACHE_USED 2
420
414
#define READ_CHECK_USED 4
421
415
#define KEY_READ_USED   8
429
423
#define HA_STATE_DELETED        8
430
424
#define HA_STATE_NEXT_FOUND     16      /* Next found record (record before) */
431
425
#define HA_STATE_PREV_FOUND     32      /* Prev found record (record after) */
432
 
#define HA_STATE_NO_KEY         64      /* Last read didn't find record */
433
426
#define HA_STATE_KEY_CHANGED    128
434
427
#define HA_STATE_WRITE_AT_END   256     /* set in _ps_find_writepos */
435
 
#define HA_STATE_BUFF_SAVED     512     /* If current keybuff is info->buff */
436
428
#define HA_STATE_ROW_CHANGED    1024    /* To invalide ROW cache */
437
429
#define HA_STATE_EXTEND_BLOCK   2048
438
430
#define HA_STATE_RNEXT_SAME     4096    /* rnext_same occupied lastkey2 */
503
495
typedef uint64_t        ha_rows;
504
496
#define rows2double(A)  uint64_t2double(A)
505
497
 
506
 
#define HA_POS_ERROR    (~ (ha_rows) 0)
507
 
#define HA_OFFSET_ERROR (~ (my_off_t) 0)
 
498
#define HA_POS_ERROR    (~ (::drizzled::ha_rows) 0)
 
499
#define HA_OFFSET_ERROR (~ (::drizzled::internal::my_off_t) 0)
508
500
 
509
501
#if SIZEOF_OFF_T == 4
510
502
#define MAX_FILE_SIZE   INT32_MAX
514
506
 
515
507
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
516
508
 
 
509
} /* namespace drizzled */
 
510
 
517
511
#endif /* DRIZZLED_BASE_H */