~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/base.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-21 20:26:28 UTC
  • mto: (960.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 961.
  • Revision ID: osullivan.padraig@gmail.com-20090321202628-nh6qsi825m4d4av6
Removing the queues.[h,cc] files from the mysys directory. The only place
where they are needed now is in the MyISAM storage engine. Thus, I moved the
files there and updated the files in the MyISAM storage engine
appropriately.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
/* This file includes constants used with all databases */
21
21
 
22
 
/** 
23
 
 * @TODO Name this file something better and split it out if necessary.  
24
 
 * base.h isn't descriptive, especially compared to global.h 
 
22
/**
 
23
 * @TODO Name this file something better and split it out if necessary.
 
24
 * base.h isn't descriptive, especially compared to global.h
25
25
 *
26
26
 * @TODO Convert HA_XXX defines into enums and/or bitmaps
27
27
 */
29
29
#ifndef DRIZZLE_SERVER_BASE_H
30
30
#define DRIZZLE_SERVER_BASE_H
31
31
 
32
 
#ifndef stdin                           /* Included first in handler */
33
32
#define CHSIZE_USED
34
 
#include <drizzled/global.h>
35
 
#include <mysys/my_dir.h>               /* This includes types */
36
 
#include <mysys/my_sys.h>
37
 
#include <mystrings/m_string.h>
38
 
#include <errno.h>
39
 
 
40
 
#ifndef EOVERFLOW
41
 
#define EOVERFLOW 84
42
 
#endif
43
 
 
44
 
#endif  /* stdin */
45
 
#include <mysys/my_list.h>
46
33
 
47
34
/* The following is bits in the flag parameter to ha_open() */
48
35
 
108
95
 
109
96
        /* Index and table build methods */
110
97
 
111
 
enum ha_build_method { 
112
 
  HA_BUILD_DEFAULT, 
 
98
enum ha_build_method {
 
99
  HA_BUILD_DEFAULT,
113
100
  HA_BUILD_ONLINE,
114
 
  HA_BUILD_OFFLINE 
 
101
  HA_BUILD_OFFLINE
115
102
};
116
103
 
117
104
        /* The following is parameter to ha_extra() */
154
141
  HA_EXTRA_CHANGE_KEY_TO_UNIQUE,
155
142
  HA_EXTRA_CHANGE_KEY_TO_DUP,
156
143
  /*
157
 
    When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep 
 
144
    When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep
158
145
    other fields intact. When this is off (by default) InnoDB will use memcpy
159
146
    to overwrite entire row.
160
147
  */
180
167
  HA_EXTRA_WRITE_CANNOT_REPLACE,
181
168
  /*
182
169
    Inform handler that delete_row()/update_row() cannot batch deletes/updates
183
 
    and should perform them immediately. This may be needed when table has 
 
170
    and should perform them immediately. This may be needed when table has
184
171
    AFTER DELETE/UPDATE triggers which access to subject table.
185
172
    These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
186
173
  */
258
245
#define HA_VAR_LENGTH_KEY        8
259
246
#define HA_NULL_PART_KEY         64
260
247
#define HA_USES_COMMENT          4096
261
 
#define HA_USES_BLOCK_SIZE       ((uint) 32768)
 
248
#define HA_USES_BLOCK_SIZE       ((uint32_t) 32768)
262
249
#define HA_SORT_ALLOWS_SAME      512    /* Intern bit when sorting records */
263
250
 
264
251
        /* These flags can be added to key-seg-flag */
291
278
#define HA_OPTION_RELIES_ON_SQL_LAYER   512
292
279
#define HA_OPTION_NULL_FIELDS           1024
293
280
#define HA_OPTION_PAGE_CHECKSUM         2048
294
 
#define HA_OPTION_TEMP_COMPRESS_RECORD  ((uint) 16384)  /* set by isamchk */
295
 
#define HA_OPTION_READ_ONLY_DATA        ((uint) 32768)  /* Set by isamchk */
 
281
#define HA_OPTION_TEMP_COMPRESS_RECORD  ((uint32_t) 16384)      /* set by isamchk */
 
282
#define HA_OPTION_READ_ONLY_DATA        ((uint32_t) 32768)      /* Set by isamchk */
296
283
 
297
284
        /* Bits in flag to create() */
298
285
 
437
424
        /* Other constants */
438
425
 
439
426
#define HA_NAMELEN 64                   /* Max length of saved filename */
440
 
#define NO_SUCH_KEY (~(uint)0)          /* used as a key no. */
 
427
#define NO_SUCH_KEY (~(uint32_t)0)          /* used as a key no. */
441
428
 
442
429
typedef ulong key_part_map;
443
430
#define HA_WHOLE_KEY  (~(key_part_map)0)
512
499
/* X > key, i.e. not including the right endpoint */
513
500
#define NEAR_MAX        8
514
501
 
515
 
/* 
516
 
  This flag means that index is a unique index, and the interval is 
 
502
/*
 
503
  This flag means that index is a unique index, and the interval is
517
504
  equivalent to "AND(keypart_i = const_i)", where all of const_i are not NULLs.
518
505
*/
519
506
#define UNIQUE_RANGE    16
520
507
 
521
 
/* 
522
 
  This flag means that the interval is equivalent to 
523
 
  "AND(keypart_i = const_i)", where not all key parts may be used but all of 
 
508
/*
 
509
  This flag means that the interval is equivalent to
 
510
  "AND(keypart_i = const_i)", where not all key parts may be used but all of
524
511
  const_i are not NULLs.
525
512
*/
526
513
#define EQ_RANGE        32
527
514
 
528
515
/*
529
516
  This flag has the same meaning as UNIQUE_RANGE, except that for at least
530
 
  one keypart the condition is "keypart IS NULL". 
 
517
  one keypart the condition is "keypart IS NULL".
531
518
*/
532
519
#define NULL_RANGE      64
533
520
 
563
550
 
564
551
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
565
552
 
566
 
/* invalidator function reference for Query Cache */
567
 
typedef void (* invalidator_by_filename)(const char * filename);
568
 
 
569
553
#endif /* DRIZZLE_SERVER_BASE_H */