25
25
#ifndef _libdrizzle_drizzle_com_h
26
26
#define _libdrizzle_drizzle_com_h
29
This is included in the server and in the client.
30
Options for select set by the yacc parser (stored in lex->options).
33
log_event.h defines OPTIONS_WRITTEN_TO_BIN_LOG to specify what THD
34
options list are written into binlog. These options can NOT change their
35
values, or it will break replication between version.
37
context is encoded as following:
38
SELECT - SELECT_LEX_NODE::options
40
intern - neither. used only as
41
func(..., select_node->options | thd->options | OPTION_XXX, ...)
43
TODO: separate three contexts above, move them to separate bitfields.
46
#define SELECT_DISTINCT (1ULL << 0) // SELECT, user
47
#define SELECT_STRAIGHT_JOIN (1ULL << 1) // SELECT, user
48
#define SELECT_DESCRIBE (1ULL << 2) // SELECT, user
49
#define SELECT_SMALL_RESULT (1ULL << 3) // SELECT, user
50
#define SELECT_BIG_RESULT (1ULL << 4) // SELECT, user
51
#define OPTION_FOUND_ROWS (1ULL << 5) // SELECT, user
52
#define SELECT_NO_JOIN_CACHE (1ULL << 7) // intern
53
#define OPTION_BIG_TABLES (1ULL << 8) // THD, user
54
#define OPTION_BIG_SELECTS (1ULL << 9) // THD, user
55
#define OPTION_LOG_OFF (1ULL << 10) // THD, user
56
#define OPTION_QUOTE_SHOW_CREATE (1ULL << 11) // THD, user, unused
57
#define TMP_TABLE_ALL_COLUMNS (1ULL << 12) // SELECT, intern
58
#define OPTION_WARNINGS (1ULL << 13) // THD, user
59
#define OPTION_AUTO_IS_NULL (1ULL << 14) // THD, user, binlog
60
#define OPTION_FOUND_COMMENT (1ULL << 15) // SELECT, intern, parser
61
#define OPTION_SAFE_UPDATES (1ULL << 16) // THD, user
62
#define OPTION_BUFFER_RESULT (1ULL << 17) // SELECT, user
63
#define OPTION_BIN_LOG (1ULL << 18) // THD, user
64
#define OPTION_NOT_AUTOCOMMIT (1ULL << 19) // THD, user
65
#define OPTION_BEGIN (1ULL << 20) // THD, intern
66
#define OPTION_TABLE_LOCK (1ULL << 21) // THD, intern
67
#define OPTION_QUICK (1ULL << 22) // SELECT (for DELETE)
68
#define OPTION_KEEP_LOG (1ULL << 23) // THD, user
70
/* The following is used to detect a conflict with DISTINCT */
71
#define SELECT_ALL (1ULL << 24) // SELECT, user, parser
73
/** The following can be set when importing tables in a 'wrong order'
74
to suppress foreign key checks */
75
#define OPTION_NO_FOREIGN_KEY_CHECKS (1ULL << 26) // THD, user, binlog
76
/** The following speeds up inserts to InnoDB tables by suppressing unique
77
key checks in some cases */
78
#define OPTION_RELAXED_UNIQUE_CHECKS (1ULL << 27) // THD, user, binlog
79
#define SELECT_NO_UNLOCK (1ULL << 28) // SELECT, intern
80
#define OPTION_SCHEMA_TABLE (1ULL << 29) // SELECT, intern
81
/** Flag set if setup_tables already done */
82
#define OPTION_SETUP_TABLES_DONE (1ULL << 30) // intern
83
/** If not set then the thread will ignore all warnings with level notes. */
84
#define OPTION_SQL_NOTES (1ULL << 31) // THD, user
86
Force the used temporary table to be a MyISAM table (because we will use
87
fulltext functions when reading from it.
89
#define TMP_TABLE_FORCE_MYISAM (1ULL << 32)
90
#define OPTION_PROFILING (1ULL << 33)
93
Dont report errors for individual rows,
94
But just report error on commit (or read ofcourse)
96
#define OPTION_ALLOW_BATCH (1ULL << 33) // THD, intern (slave)
99
Maximum length of time zone name that we support
100
(Time zone name is char(64) in db). mysqlbinlog needs it.
102
#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1)
28
104
#define HOSTNAME_LENGTH 60
29
105
#define SYSTEM_CHARSET_MBMAXLEN 4
30
106
#define NAME_CHAR_LEN 64 /* Field/table name length */