55
55
#define SELECT_NO_JOIN_CACHE (UINT64_C(1) << 7) // intern
56
56
#define OPTION_BIG_TABLES (UINT64_C(1) << 8) // THD, user
57
57
#define OPTION_BIG_SELECTS (UINT64_C(1) << 9) // THD, user
58
#define OPTION_LOG_OFF (UINT64_C(1) << 10) // THD, user
59
58
#define TMP_TABLE_ALL_COLUMNS (UINT64_C(1) << 12) // SELECT, intern
60
59
#define OPTION_WARNINGS (UINT64_C(1) << 13) // THD, user
61
60
#define OPTION_AUTO_IS_NULL (UINT64_C(1) << 14) // THD, user, binlog
74
73
key checks in some cases */
75
74
#define OPTION_RELAXED_UNIQUE_CHECKS (UINT64_C(1) << 27) // THD, user, binlog
76
75
#define SELECT_NO_UNLOCK (UINT64_C(1) << 28) // SELECT, intern
77
#define OPTION_SCHEMA_TABLE (UINT64_C(1) << 29) // SELECT, intern
78
76
/** Flag set if setup_tables already done */
79
77
#define OPTION_SETUP_TABLES_DONE (UINT64_C(1) << 30) // intern
80
78
/** If not set then the thread will ignore all warnings with level notes. */
81
79
#define OPTION_SQL_NOTES (UINT64_C(1) << 31) // THD, user
82
#define OPTION_PROFILING (UINT64_C(1) << 33)
85
Dont report errors for individual rows,
86
But just report error on commit (or read ofcourse)
88
#define OPTION_ALLOW_BATCH (UINT64_C(1) << 33) // THD, intern (slave)
91
82
Maximum length of time zone name that we support
104
95
#define SQLSTATE_LENGTH 5
107
Maximum length of comments
109
#define TABLE_COMMENT_MAXLEN 2048
110
#define COLUMN_COMMENT_MAXLEN 1024
111
#define INDEX_COMMENT_MAXLEN 1024
114
98
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
115
99
username and hostname parts of the user identifier with trailing zero in
116
100
MySQL standard format:
144
126
#define ENUM_FLAG 256 /* field is an enum */
145
127
#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
146
128
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
147
#define SET_FLAG 2048 /* field is a set */
148
129
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
149
130
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
150
#define NUM_FLAG 32768 /* Field is num (for clients) */
151
131
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
152
132
#define GROUP_FLAG 32768 /* Intern: Group field */
153
133
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
154
134
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
155
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
156
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
157
#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */
158
#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */
159
#define FIELD_STORAGE_FLAGS 22 /* Storage type: bit 22, 23 and 24 */
160
135
#define COLUMN_FORMAT_FLAGS 25 /* Column format: bit 25, 26 and 27 */
162
#define REFRESH_LOG 2 /* Start on new log file */
163
#define REFRESH_TABLES 4 /* close all tables */
164
#define REFRESH_STATUS 16 /* Flush status variables */
166
/* The following can't be set with mysql_refresh() */
167
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
168
#define REFRESH_FAST 32768 /* Intern flag */
136
#define COLUMN_FORMAT_MASK 7
170
138
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
171
139
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
172
140
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
173
141
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
174
142
#define SERVER_QUERY_NO_INDEX_USED 32
176
The server was able to fulfill the clients request and opened a
177
read-only non-scrollable cursor for a query. This flag comes
178
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
180
#define SERVER_STATUS_CURSOR_EXISTS 64
182
This flag is sent when a read-only cursor is exhausted, in reply to
183
COM_STMT_FETCH command.
185
#define SERVER_STATUS_LAST_ROW_SENT 128
186
143
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
187
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
189
Tell clients that this query was logged to the slow query log.
190
Not yet set in the server, but interface is defined for applications
191
to use. See WorkLog 4098.
193
#define SERVER_QUERY_WAS_SLOW 1024
195
145
#define DRIZZLE_ERRMSG_SIZE 512
209
158
#define packet_error (~(uint32_t) 0)
212
/* Shutdown/kill enums and constants */
214
/* Bits for THD::killable. */
215
#define DRIZZLE_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
216
#define DRIZZLE_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
217
#define DRIZZLE_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
218
#define DRIZZLE_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
220
160
#if defined(__cplusplus)
222
162
namespace drizzled
251
191
DRIZZLE_TYPE_MAX=DRIZZLE_TYPE_BLOB
255
/* The following is for user defined functions */
257
enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT,
260
194
} /* namespace drizzled */
262
196
#endif /* defined(__cplusplus) */