~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definitions.h

Merged in Eric's whitespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
/**
21
21
 * @file
22
22
 *
23
 
 * Mostly constants and some macros/functions used by the server  
 
23
 * Mostly constants and some macros/functions used by the server
24
24
 */
25
25
 
26
26
#ifndef DRIZZLE_SERVER_DEFINITIONS_H
172
172
*/
173
173
#define MIN_TURBOBM_PATTERN_LEN 3
174
174
 
175
 
/* 
 
175
/*
176
176
   Defines for binary logging.
177
177
   Do not decrease the value of BIN_LOG_HEADER_SIZE.
178
178
   Do not even increase it before checking code.
179
179
*/
180
180
 
181
 
#define BIN_LOG_HEADER_SIZE    4 
 
181
#define BIN_LOG_HEADER_SIZE    4
182
182
 
183
183
#define DEFAULT_KEY_CACHE_NAME "default"
184
184
 
199
199
#define TABLE_OPEN_CACHE_MIN    64
200
200
#define TABLE_OPEN_CACHE_DEFAULT 64
201
201
 
202
 
/* 
 
202
/*
203
203
 Value of 9236 discovered through binary search 2006-09-26 on Ubuntu Dapper
204
 
 Drake, libc6 2.3.6-0ubuntu2, Linux kernel 2.6.15-27-686, on x86.  (Added 
 
204
 Drake, libc6 2.3.6-0ubuntu2, Linux kernel 2.6.15-27-686, on x86.  (Added
205
205
 100 bytes as reasonable buffer against growth and other environments'
206
206
 requirements.)
207
207
 
213
213
#define STACK_MIN_SIZE_FOR_OPEN 1024*80
214
214
#define STACK_BUFF_ALLOC        352     ///< For stack overrun checks
215
215
 
216
 
/** 
 
216
/**
217
217
 * @TODO Move into a drizzled.h since it's only used in drizzled.cc
218
218
 *
219
219
 * @TODO Rename to DRIZZLED_NET_RETRY_COUNT
253
253
#define TIME_FOR_COMPARE   5    // 5 compares == one read
254
254
 
255
255
/**
256
 
  Number of comparisons of table rowids equivalent to reading one row from a 
 
256
  Number of comparisons of table rowids equivalent to reading one row from a
257
257
  table.
258
258
*/
259
259
#define TIME_FOR_COMPARE_ROWID  (TIME_FOR_COMPARE*2)
260
260
 
261
261
/*
262
262
  For sequential disk seeks the cost formula is:
263
 
    DISK_SEEK_BASE_COST + DISK_SEEK_PROP_COST * #blocks_to_skip  
264
 
  
265
 
  The cost of average seek 
 
263
    DISK_SEEK_BASE_COST + DISK_SEEK_PROP_COST * #blocks_to_skip
 
264
 
 
265
  The cost of average seek
266
266
    DISK_SEEK_BASE_COST + DISK_SEEK_PROP_COST*BLOCKS_IN_AVG_SEEK =1.0.
267
267
*/
268
268
#define DISK_SEEK_BASE_COST ((double)0.9)
605
605
/*
606
606
  If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
607
607
  uses a primary key. Without primary key, we can't call position().
608
 
*/ 
609
 
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16) 
 
608
*/
 
609
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
610
610
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
611
611
/*
612
612
  The following is we need to a primary key to delete (and update) a row.
650
650
  Index scan will not return records in rowid order. Not guaranteed to be
651
651
  set for unordered (e.g. HASH) indexes.
652
652
*/
653
 
#define HA_KEY_SCAN_NOT_ROR     128 
 
653
#define HA_KEY_SCAN_NOT_ROR     128
654
654
#define HA_DO_INDEX_COND_PUSHDOWN  256 /* Supports Index Condition Pushdown */
655
655
 
656
656
 
825
825
#define HA_MRR_SINGLE_POINT 1
826
826
#define HA_MRR_FIXED_KEY  2
827
827
 
828
 
/* 
 
828
/*
829
829
  Indicates that RANGE_SEQ_IF::next(&range) doesn't need to fill in the
830
830
  'range' parameter.
831
831
*/
832
832
#define HA_MRR_NO_ASSOCIATION 4
833
833
 
834
 
/* 
 
834
/*
835
835
  The MRR user will provide ranges in key order, and MRR implementation
836
836
  must return rows in key order.
837
837
*/
840
840
/* MRR implementation doesn't have to retrieve full records */
841
841
#define HA_MRR_INDEX_ONLY 16
842
842
 
843
 
/* 
 
843
/*
844
844
  The passed memory buffer is of maximum possible size, the caller can't
845
845
  assume larger buffer.
846
846
*/
904
904
  SQLCOM_COMMIT, SQLCOM_SAVEPOINT, SQLCOM_RELEASE_SAVEPOINT,
905
905
  SQLCOM_SLAVE_START, SQLCOM_SLAVE_STOP,
906
906
  SQLCOM_BEGIN, SQLCOM_CHANGE_MASTER,
907
 
  SQLCOM_RENAME_TABLE,  
 
907
  SQLCOM_RENAME_TABLE,
908
908
  SQLCOM_RESET, SQLCOM_PURGE, SQLCOM_PURGE_BEFORE, SQLCOM_SHOW_BINLOGS,
909
909
  SQLCOM_SHOW_OPEN_TABLES,
910
910
  SQLCOM_DELETE_MULTI, SQLCOM_UPDATE_MULTI,
996
996
 
997
997
  [signed] int64_t F(field1, field2, ...) {
998
998
    put values of field_i into table record buffer;
999
 
    return item->val_int(); 
 
999
    return item->val_int();
1000
1000
  }
1001
1001
 
1002
1002
  NOTE
1007
1007
  (BUG#16002, BUG#15447, BUG#13436) are fixed.
1008
1008
*/
1009
1009
 
1010
 
typedef enum monotonicity_info 
 
1010
typedef enum monotonicity_info
1011
1011
{
1012
1012
   NON_MONOTONIC,              /* none of the below holds */
1013
1013
   MONOTONIC_INCREASING,       /* F() is unary and (x < y) => (F(x) <= F(y)) */