223
223
#define COLUMN_FORMAT_MASK 7
224
224
#define COLUMN_FORMAT_SHIFT 3
226
/* Below are #defines that used to be in mysql_priv.h */
227
/***************************************************************************
228
Configuration parameters
229
****************************************************************************/
230
#define ACL_CACHE_SIZE 256
231
#define MAX_PASSWORD_LENGTH 32
232
#define HOST_CACHE_SIZE 128
233
#define MAX_ACCEPT_RETRY 10 // Test accept this many times
234
#define MAX_FIELDS_BEFORE_HASH 32
235
#define USER_VARS_HASH_SIZE 16
236
#define TABLE_OPEN_CACHE_MIN 64
237
#define TABLE_OPEN_CACHE_DEFAULT 64
240
Value of 9236 discovered through binary search 2006-09-26 on Ubuntu Dapper
241
Drake, libc6 2.3.6-0ubuntu2, Linux kernel 2.6.15-27-686, on x86. (Added
242
100 bytes as reasonable buffer against growth and other environments'
245
Feel free to raise this by the smallest amount you can to get the
246
"execution_constants" test to pass.
248
#define STACK_MIN_SIZE 12000 ///< Abort if less stack during eval.
250
#define STACK_MIN_SIZE_FOR_OPEN 1024*80
251
#define STACK_BUFF_ALLOC 352 ///< For stack overrun checks
254
* @TODO Move into a drizzled.h since it's only used in drizzled.cc
256
* @TODO Rename to DRIZZLED_NET_RETRY_COUNT
258
#ifndef MYSQLD_NET_RETRY_COUNT
259
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
261
#define TEMP_POOL_SIZE 128
263
#define QUERY_ALLOC_BLOCK_SIZE 8192
264
#define QUERY_ALLOC_PREALLOC_SIZE 8192
265
#define TRANS_ALLOC_BLOCK_SIZE 4096
266
#define TRANS_ALLOC_PREALLOC_SIZE 4096
267
#define RANGE_ALLOC_BLOCK_SIZE 4096
268
#define ACL_ALLOC_BLOCK_SIZE 1024
269
#define UDF_ALLOC_BLOCK_SIZE 1024
270
#define TABLE_ALLOC_BLOCK_SIZE 1024
271
#define BDB_LOG_ALLOC_BLOCK_SIZE 1024
272
#define WARN_ALLOC_BLOCK_SIZE 2048
273
#define WARN_ALLOC_PREALLOC_SIZE 1024
274
#define PROFILE_ALLOC_BLOCK_SIZE 2048
275
#define PROFILE_ALLOC_PREALLOC_SIZE 1024
278
The following parameters is to decide when to use an extra cache to
279
optimise seeks when reading a big table in sorted order
281
#define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (10L*1024*1024)
282
#define MIN_ROWS_TO_USE_TABLE_CACHE 100
283
#define MIN_ROWS_TO_USE_BULK_INSERT 100
286
The following is used to decide if MySQL should use table scanning
287
instead of reading with keys. The number says how many evaluation of the
288
WHERE clause is comparable to reading one extra row from a table.
290
#define TIME_FOR_COMPARE 5 // 5 compares == one read
293
Number of comparisons of table rowids equivalent to reading one row from a
296
#define TIME_FOR_COMPARE_ROWID (TIME_FOR_COMPARE*2)
299
For sequential disk seeks the cost formula is:
300
DISK_SEEK_BASE_COST + DISK_SEEK_PROP_COST * #blocks_to_skip
302
The cost of average seek
303
DISK_SEEK_BASE_COST + DISK_SEEK_PROP_COST*BLOCKS_IN_AVG_SEEK =1.0.
305
#define DISK_SEEK_BASE_COST ((double)0.9)
307
#define BLOCKS_IN_AVG_SEEK 128
309
#define DISK_SEEK_PROP_COST ((double)0.1/BLOCKS_IN_AVG_SEEK)
313
Number of rows in a reference table when refereed through a not unique key.
314
This value is only used when we don't know anything about the key
317
#define MATCHING_ROWS_IN_OTHER_TABLE 10
319
/** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */
320
#define KEY_DEFAULT_PACK_LENGTH 8
322
/** Characters shown for the command in 'show processlist'. */
323
#define PROCESS_LIST_WIDTH 100
324
/* Characters shown for the command in 'information_schema.processlist' */
325
#define PROCESS_LIST_INFO_WIDTH 65535
327
#define PRECISION_FOR_DOUBLE 53
328
#define PRECISION_FOR_FLOAT 24
331
Default time to wait before aborting a new client connection
332
that does not respond to "initial server greeting" timely
334
#define CONNECT_TIMEOUT 10
336
/* The following can also be changed from the command line */
337
#define DEFAULT_CONCURRENCY 10
338
#define FLUSH_TIME 0 /**< Don't flush tables */
339
#define MAX_CONNECT_ERRORS 10 ///< errors before disabling host
341
#define INTERRUPT_PRIOR 10
342
#define CONNECT_PRIOR 9
344
#define QUERY_PRIOR 6
346
/* Bits from testflag */
347
#define TEST_PRINT_CACHED_TABLES 1
348
#define TEST_NO_KEY_GROUP 2
349
#define TEST_MIT_THREAD 4
350
#define TEST_BLOCKING 8
351
#define TEST_KEEP_TMP_TABLES 16
352
#define TEST_READCHECK 64 /**< Force use of readcheck */
353
#define TEST_NO_EXTRA 128
354
#define TEST_CORE_ON_SIGNAL 256 /**< Give core if signal */
355
#define TEST_NO_STACKTRACE 512
356
#define TEST_SIGINT 1024 /**< Allow sigint on threads */
357
#define TEST_SYNCHRONIZATION 2048 /**< get server to do sleep in some places */
358
#endif /* End ifndef MYSQL_CLIENT */
360
/* The rest of the file is included in the server only */
363
/* Bits for different SQL modes modes (including ANSI mode) */
364
#define MODE_REAL_AS_FLOAT 1
365
#define MODE_PIPES_AS_CONCAT 2
366
#define MODE_ANSI_QUOTES 4
367
#define MODE_IGNORE_SPACE 8
368
#define MODE_NOT_USED 16
369
#define MODE_ONLY_FULL_GROUP_BY 32
370
#define MODE_NO_UNSIGNED_SUBTRACTION 64
371
#define MODE_NO_DIR_IN_CREATE 128
372
#define MODE_POSTGRESQL 256
373
#define MODE_ORACLE 512
374
#define MODE_MSSQL 1024
375
#define MODE_DB2 2048
376
#define MODE_MAXDB 4096
377
#define MODE_NO_KEY_OPTIONS 8192
378
#define MODE_NO_TABLE_OPTIONS 16384
379
#define MODE_NO_FIELD_OPTIONS 32768
380
#define MODE_MYSQL323 65536L
381
#define MODE_MYSQL40 (MODE_MYSQL323*2)
382
#define MODE_ANSI (MODE_MYSQL40*2)
383
#define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2)
384
#define MODE_NO_BACKSLASH_ESCAPES (MODE_NO_AUTO_VALUE_ON_ZERO*2)
385
#define MODE_STRICT_TRANS_TABLES (MODE_NO_BACKSLASH_ESCAPES*2)
386
#define MODE_STRICT_ALL_TABLES (MODE_STRICT_TRANS_TABLES*2)
387
#define MODE_NO_ZERO_IN_DATE (MODE_STRICT_ALL_TABLES*2)
388
#define MODE_NO_ZERO_DATE (MODE_NO_ZERO_IN_DATE*2)
389
#define MODE_INVALID_DATES (MODE_NO_ZERO_DATE*2)
390
#define MODE_ERROR_FOR_DIVISION_BY_ZERO (MODE_INVALID_DATES*2)
391
#define MODE_TRADITIONAL (MODE_ERROR_FOR_DIVISION_BY_ZERO*2)
392
#define MODE_NO_AUTO_CREATE_USER (MODE_TRADITIONAL*2)
393
#define MODE_HIGH_NOT_PRECEDENCE (MODE_NO_AUTO_CREATE_USER*2)
394
#define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2)
395
#define MODE_PAD_CHAR_TO_FULL_LENGTH (1ULL << 31)
397
/* @@optimizer_switch flags */
398
#define OPTIMIZER_SWITCH_NO_MATERIALIZATION 1
399
#define OPTIMIZER_SWITCH_NO_SEMIJOIN 2
402
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
403
use strictly more than 64 bits by adding one more define above, you should
404
contact the replication team because the replication code should then be
405
updated (to store more bytes on disk).
407
NOTE: When adding new SQL_MODE types, make sure to also add them to
408
the scripts used for creating the MySQL system tables
409
in scripts/mysql_system_tables.sql and scripts/mysql_system_tables_fix.sql
412
#define RAID_BLOCK_SIZE 1024
414
#define MY_CHARSET_BIN_MB_MAXLEN 1
417
#define UNCACHEABLE_DEPENDENT 1
418
#define UNCACHEABLE_RAND 2
419
#define UNCACHEABLE_SIDEEFFECT 4
420
/// forcing to save JOIN for explain
421
#define UNCACHEABLE_EXPLAIN 8
422
/** Don't evaluate subqueries in prepare even if they're not correlated */
423
#define UNCACHEABLE_PREPARE 16
424
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
425
#define UNCACHEABLE_UNITED 32
427
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
428
#define UNDEF_POS (-1)
430
/* BINLOG_DUMP options */
432
#define BINLOG_DUMP_NON_BLOCK 1
434
/* sql_show.cc:show_log_files() */
435
#define SHOW_LOG_STATUS_FREE "FREE"
436
#define SHOW_LOG_STATUS_INUSE "IN USE"
438
/* Options to add_table_to_list() */
439
#define TL_OPTION_UPDATING 1
440
#define TL_OPTION_FORCE_INDEX 2
441
#define TL_OPTION_IGNORE_LEAVES 4
442
#define TL_OPTION_ALIAS 8
444
/* Some portable defines */
446
#define portable_sizeof_char_ptr 8
448
#define tmp_file_prefix "#sql" /**< Prefix for tmp tables */
449
#define tmp_file_prefix_length 4
451
/* Flags for calc_week() function. */
452
#define WEEK_MONDAY_FIRST 1
454
#define WEEK_FIRST_WEEKDAY 4
456
#define STRING_BUFFER_USUAL_SIZE 80
459
Some defines for exit codes for ::is_equal class functions.
461
#define IS_EQUAL_NO 0
462
#define IS_EQUAL_YES 1
463
#define IS_EQUAL_PACK_LENGTH 2
226
466
#endif /* DRIZZLE_SERVER_DEFINITIONS_H */