520.1.25
by Monty Taylor
Removed the split. |
1 |
/* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
236.1.23
by Monty Taylor
Cleaned header headers. |
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
3 |
*
|
|
390.1.3
by Monty Taylor
Copyright header fixes. |
4 |
* Copyright (C) 2008 Sun Microsystems, Inc.
|
236.1.23
by Monty Taylor
Cleaned header headers. |
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
390.1.3
by Monty Taylor
Copyright header fixes. |
8 |
* the Free Software Foundation; version 2 of the License.
|
236.1.23
by Monty Taylor
Cleaned header headers. |
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
1
by brian
clean slate |
19 |
|
20 |
/*
|
|
21 |
** Common definition between mysql server & client
|
|
22 |
*/
|
|
23 |
||
540
by Monty Taylor
Moved drizzle_com to drizzled/drizzle_common. Started splitting it up. |
24 |
#ifndef DRIZZLED_DRIZZLE_COMMON_H
|
542
by Monty Taylor
Cleaned up the last commit. |
25 |
#define DRIZZLED_DRIZZLE_COMMON_H
|
1
by brian
clean slate |
26 |
|
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
27 |
#include <unistd.h> |
28 |
#include <stdbool.h> |
|
29 |
#include <stdint.h> |
|
542
by Monty Taylor
Cleaned up the last commit. |
30 |
#include <drizzled/korr.h> |
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
31 |
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
32 |
/*
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
33 |
This is included in the server and in the client.
|
34 |
Options for select set by the yacc parser (stored in lex->options).
|
|
35 |
||
36 |
XXX:
|
|
37 |
log_event.h defines OPTIONS_WRITTEN_TO_BIN_LOG to specify what THD
|
|
38 |
options list are written into binlog. These options can NOT change their
|
|
39 |
values, or it will break replication between version.
|
|
40 |
||
41 |
context is encoded as following:
|
|
42 |
SELECT - SELECT_LEX_NODE::options
|
|
43 |
THD - THD::options
|
|
44 |
intern - neither. used only as
|
|
45 |
func(..., select_node->options | thd->options | OPTION_XXX, ...)
|
|
46 |
||
47 |
TODO: separate three contexts above, move them to separate bitfields.
|
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
48 |
*/
|
49 |
||
422
by Monty
Various int64 constant fixes. |
50 |
#define SELECT_DISTINCT (UINT64_C(1) << 0) // SELECT, user |
51 |
#define SELECT_STRAIGHT_JOIN (UINT64_C(1) << 1) // SELECT, user |
|
52 |
#define SELECT_DESCRIBE (UINT64_C(1) << 2) // SELECT, user |
|
53 |
#define SELECT_SMALL_RESULT (UINT64_C(1) << 3) // SELECT, user |
|
54 |
#define SELECT_BIG_RESULT (UINT64_C(1) << 4) // SELECT, user |
|
55 |
#define OPTION_FOUND_ROWS (UINT64_C(1) << 5) // SELECT, user |
|
56 |
#define SELECT_NO_JOIN_CACHE (UINT64_C(1) << 7) // intern |
|
57 |
#define OPTION_BIG_TABLES (UINT64_C(1) << 8) // THD, user |
|
58 |
#define OPTION_BIG_SELECTS (UINT64_C(1) << 9) // THD, user |
|
59 |
#define OPTION_LOG_OFF (UINT64_C(1) << 10) // THD, user |
|
60 |
#define OPTION_QUOTE_SHOW_CREATE (UINT64_C(1) << 11) // THD, user, unused |
|
61 |
#define TMP_TABLE_ALL_COLUMNS (UINT64_C(1) << 12) // SELECT, intern |
|
62 |
#define OPTION_WARNINGS (UINT64_C(1) << 13) // THD, user |
|
63 |
#define OPTION_AUTO_IS_NULL (UINT64_C(1) << 14) // THD, user, binlog |
|
64 |
#define OPTION_FOUND_COMMENT (UINT64_C(1) << 15) // SELECT, intern, parser |
|
65 |
#define OPTION_SAFE_UPDATES (UINT64_C(1) << 16) // THD, user |
|
66 |
#define OPTION_BUFFER_RESULT (UINT64_C(1) << 17) // SELECT, user |
|
67 |
#define OPTION_BIN_LOG (UINT64_C(1) << 18) // THD, user |
|
68 |
#define OPTION_NOT_AUTOCOMMIT (UINT64_C(1) << 19) // THD, user |
|
69 |
#define OPTION_BEGIN (UINT64_C(1) << 20) // THD, intern |
|
70 |
#define OPTION_TABLE_LOCK (UINT64_C(1) << 21) // THD, intern |
|
71 |
#define OPTION_QUICK (UINT64_C(1) << 22) // SELECT (for DELETE) |
|
72 |
#define OPTION_KEEP_LOG (UINT64_C(1) << 23) // THD, user |
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
73 |
|
74 |
/* The following is used to detect a conflict with DISTINCT */
|
|
422
by Monty
Various int64 constant fixes. |
75 |
#define SELECT_ALL (UINT64_C(1) << 24) // SELECT, user, parser |
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
76 |
|
77 |
/** The following can be set when importing tables in a 'wrong order'
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
78 |
to suppress foreign key checks */
|
422
by Monty
Various int64 constant fixes. |
79 |
#define OPTION_NO_FOREIGN_KEY_CHECKS (UINT64_C(1) << 26) // THD, user, binlog |
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
80 |
/** The following speeds up inserts to InnoDB tables by suppressing unique
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
81 |
key checks in some cases */
|
422
by Monty
Various int64 constant fixes. |
82 |
#define OPTION_RELAXED_UNIQUE_CHECKS (UINT64_C(1) << 27) // THD, user, binlog |
83 |
#define SELECT_NO_UNLOCK (UINT64_C(1) << 28) // SELECT, intern |
|
84 |
#define OPTION_SCHEMA_TABLE (UINT64_C(1) << 29) // SELECT, intern |
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
85 |
/** Flag set if setup_tables already done */
|
422
by Monty
Various int64 constant fixes. |
86 |
#define OPTION_SETUP_TABLES_DONE (UINT64_C(1) << 30) // intern |
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
87 |
/** If not set then the thread will ignore all warnings with level notes. */
|
422
by Monty
Various int64 constant fixes. |
88 |
#define OPTION_SQL_NOTES (UINT64_C(1) << 31) // THD, user |
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
89 |
/**
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
90 |
Force the used temporary table to be a MyISAM table (because we will use
|
91 |
fulltext functions when reading from it.
|
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
92 |
*/
|
422
by Monty
Various int64 constant fixes. |
93 |
#define TMP_TABLE_FORCE_MYISAM (UINT64_C(1) << 32)
|
94 |
#define OPTION_PROFILING (UINT64_C(1) << 33)
|
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
95 |
|
96 |
/*
|
|
97 |
Dont report errors for individual rows,
|
|
98 |
But just report error on commit (or read ofcourse)
|
|
99 |
*/
|
|
422
by Monty
Various int64 constant fixes. |
100 |
#define OPTION_ALLOW_BATCH (UINT64_C(1) << 33) // THD, intern (slave) |
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
101 |
|
102 |
/**
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
103 |
Maximum length of time zone name that we support
|
104 |
(Time zone name is char(64) in db). mysqlbinlog needs it.
|
|
243.1.14
by Jay Pipes
* Ensured all drizzled/field/x.cc files to include mysql_priv.h |
105 |
*/
|
106 |
#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1)
|
|
107 |
||
1
by brian
clean slate |
108 |
#define HOSTNAME_LENGTH 60
|
109 |
#define SYSTEM_CHARSET_MBMAXLEN 4
|
|
575.4.7
by Monty Taylor
More header cleanup. |
110 |
#define USERNAME_CHAR_LENGTH 16
|
1
by brian
clean slate |
111 |
#define NAME_CHAR_LEN 64 /* Field/table name length */ |
112 |
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
|
|
113 |
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
|
|
114 |
||
115 |
#define SERVER_VERSION_LENGTH 60
|
|
116 |
#define SQLSTATE_LENGTH 5
|
|
117 |
||
118 |
/*
|
|
119 |
Maximum length of comments
|
|
120 |
*/
|
|
121 |
#define TABLE_COMMENT_MAXLEN 2048
|
|
122 |
#define COLUMN_COMMENT_MAXLEN 1024
|
|
123 |
#define INDEX_COMMENT_MAXLEN 1024
|
|
124 |
||
383.7.1
by Andrey Zhakov
Initial submit of code and tests |
125 |
/* The length of the header part for each virtual column in the .frm file. */
|
126 |
#define FRM_VCOL_HEADER_SIZE 3
|
|
127 |
/*
|
|
128 |
Maximum length of the expression statement defined for virtual columns.
|
|
129 |
*/
|
|
130 |
#define VIRTUAL_COLUMN_EXPRESSION_MAXLEN 255 - FRM_VCOL_HEADER_SIZE
|
|
1
by brian
clean slate |
131 |
|
132 |
/*
|
|
133 |
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
|
|
134 |
username and hostname parts of the user identifier with trailing zero in
|
|
135 |
MySQL standard format:
|
|
136 |
user_name_part@host_name_part\0
|
|
137 |
*/
|
|
138 |
#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
|
|
139 |
||
140 |
#define LOCAL_HOST "localhost"
|
|
141 |
#define LOCAL_HOST_NAMEDPIPE "."
|
|
142 |
||
143 |
/*
|
|
144 |
You should add new commands to the end of this list, otherwise old
|
|
145 |
servers won't be able to handle them as 'unsupported'.
|
|
146 |
*/
|
|
147 |
||
148 |
enum enum_server_command |
|
149 |
{
|
|
150 |
COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, |
|
273
by Brian Aker
Remove COM_STAT |
151 |
COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, |
195
by Brian Aker
Removed HAVE_REP in drizzle.cc and dropped dead COM bits. |
152 |
COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_PING, |
153 |
COM_TIME, COM_CHANGE_USER, COM_BINLOG_DUMP, |
|
154 |
COM_CONNECT_OUT, COM_REGISTER_SLAVE, |
|
155 |
COM_SET_OPTION, COM_DAEMON, |
|
1
by brian
clean slate |
156 |
/* don't forget to update const char *command_name[] in sql_parse.cc */
|
157 |
||
158 |
/* Must be last */
|
|
159 |
COM_END
|
|
160 |
};
|
|
161 |
||
162 |
||
163 |
/*
|
|
164 |
Length of random string sent by server on handshake; this is also length of
|
|
165 |
obfuscated password, recieved from client
|
|
166 |
*/
|
|
167 |
#define SCRAMBLE_LENGTH 20
|
|
168 |
#define SCRAMBLE_LENGTH_323 8
|
|
169 |
/* length of password stored in the db: new passwords are preceeded with '*' */
|
|
170 |
#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
|
|
171 |
#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
|
|
172 |
||
173 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
174 |
#define NOT_NULL_FLAG 1 /* Field can't be NULL */ |
175 |
#define PRI_KEY_FLAG 2 /* Field is part of a primary key */ |
|
176 |
#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */ |
|
177 |
#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */ |
|
178 |
#define BLOB_FLAG 16 /* Field is a blob */ |
|
179 |
#define UNSIGNED_FLAG 32 /* Field is unsigned */ |
|
180 |
#define DECIMAL_FLAG 64 /* Field is zerofill */ |
|
181 |
#define BINARY_FLAG 128 /* Field is binary */ |
|
1
by brian
clean slate |
182 |
|
183 |
/* The following are only sent to new clients */
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
184 |
#define ENUM_FLAG 256 /* field is an enum */ |
185 |
#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */ |
|
186 |
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ |
|
187 |
#define SET_FLAG 2048 /* field is a set */ |
|
188 |
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */ |
|
1
by brian
clean slate |
189 |
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */ |
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
190 |
#define NUM_FLAG 32768 /* Field is num (for clients) */ |
191 |
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ |
|
192 |
#define GROUP_FLAG 32768 /* Intern: Group field */ |
|
193 |
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */ |
|
194 |
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ |
|
1
by brian
clean slate |
195 |
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ |
196 |
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ |
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
197 |
#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */ |
1
by brian
clean slate |
198 |
#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */ |
199 |
#define FIELD_STORAGE_FLAGS 22 /* Storage type: bit 22, 23 and 24 */ |
|
200 |
#define COLUMN_FORMAT_FLAGS 25 /* Column format: bit 25, 26 and 27 */ |
|
201 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
202 |
#define REFRESH_GRANT 1 /* Refresh grant tables */ |
203 |
#define REFRESH_LOG 2 /* Start on new log file */ |
|
204 |
#define REFRESH_TABLES 4 /* close all tables */ |
|
205 |
#define REFRESH_HOSTS 8 /* Flush host cache */ |
|
206 |
#define REFRESH_STATUS 16 /* Flush status variables */ |
|
207 |
#define REFRESH_THREADS 32 /* Flush thread cache */ |
|
1
by brian
clean slate |
208 |
#define REFRESH_SLAVE 64 /* Reset master info and restart slave |
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
209 |
thread */
|
1
by brian
clean slate |
210 |
#define REFRESH_MASTER 128 /* Remove all bin logs in the index |
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
211 |
and truncate the index */
|
1
by brian
clean slate |
212 |
|
213 |
/* The following can't be set with mysql_refresh() */
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
214 |
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */ |
215 |
#define REFRESH_FAST 32768 /* Intern flag */ |
|
1
by brian
clean slate |
216 |
|
217 |
/* RESET (remove all queries) from query cache */
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
218 |
#define REFRESH_QUERY_CACHE 65536
|
1
by brian
clean slate |
219 |
#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ |
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
220 |
#define REFRESH_DES_KEY_FILE 0x40000L
|
221 |
#define REFRESH_USER_RESOURCES 0x80000L
|
|
1
by brian
clean slate |
222 |
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
223 |
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ |
224 |
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ |
|
225 |
#define CLIENT_LONG_FLAG 4 /* Get all column flags */ |
|
226 |
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ |
|
227 |
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ |
|
228 |
#define CLIENT_COMPRESS 32 /* Can use compression protocol */ |
|
229 |
#define CLIENT_ODBC 64 /* Odbc client */ |
|
230 |
#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ |
|
231 |
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ |
|
232 |
#define UNUSED_CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ |
|
233 |
#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ |
|
234 |
#define CLIENT_SSL 2048 /* Switch to SSL after handshake */ |
|
1
by brian
clean slate |
235 |
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ |
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
236 |
#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ |
1
by brian
clean slate |
237 |
#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ |
238 |
#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ |
|
239 |
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */ |
|
240 |
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */ |
|
241 |
||
242 |
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
|
|
243 |
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
|
|
244 |
||
245 |
/* Gather all possible capabilites (flags) supported by the server */
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
246 |
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
|
247 |
CLIENT_FOUND_ROWS | \
|
|
248 |
CLIENT_LONG_FLAG | \
|
|
249 |
CLIENT_CONNECT_WITH_DB | \
|
|
250 |
CLIENT_NO_SCHEMA | \
|
|
251 |
CLIENT_COMPRESS | \
|
|
252 |
CLIENT_ODBC | \
|
|
253 |
CLIENT_LOCAL_FILES | \
|
|
254 |
CLIENT_IGNORE_SPACE | \
|
|
255 |
CLIENT_INTERACTIVE | \
|
|
256 |
CLIENT_SSL | \
|
|
257 |
CLIENT_IGNORE_SIGPIPE | \
|
|
258 |
CLIENT_TRANSACTIONS | \
|
|
259 |
CLIENT_RESERVED | \
|
|
260 |
CLIENT_SECURE_CONNECTION | \
|
|
261 |
CLIENT_MULTI_STATEMENTS | \
|
|
262 |
CLIENT_MULTI_RESULTS | \
|
|
1
by brian
clean slate |
263 |
CLIENT_SSL_VERIFY_SERVER_CERT | \
|
264 |
CLIENT_REMEMBER_OPTIONS)
|
|
265 |
||
266 |
/*
|
|
267 |
Switch off the flags that are optional and depending on build flags
|
|
268 |
If any of the optional flags is supported by the build it will be switched
|
|
269 |
on before sending to the client during the connection handshake.
|
|
270 |
*/
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
271 |
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
|
272 |
& ~CLIENT_COMPRESS) \
|
|
273 |
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
|
|
1
by brian
clean slate |
274 |
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
275 |
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ |
276 |
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ |
|
1
by brian
clean slate |
277 |
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ |
278 |
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
|
|
279 |
#define SERVER_QUERY_NO_INDEX_USED 32
|
|
280 |
/*
|
|
281 |
The server was able to fulfill the clients request and opened a
|
|
282 |
read-only non-scrollable cursor for a query. This flag comes
|
|
283 |
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
|
|
284 |
*/
|
|
285 |
#define SERVER_STATUS_CURSOR_EXISTS 64
|
|
286 |
/*
|
|
287 |
This flag is sent when a read-only cursor is exhausted, in reply to
|
|
288 |
COM_STMT_FETCH command.
|
|
289 |
*/
|
|
290 |
#define SERVER_STATUS_LAST_ROW_SENT 128
|
|
291 |
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ |
|
292 |
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
|
|
293 |
/*
|
|
294 |
Tell clients that this query was logged to the slow query log.
|
|
295 |
Not yet set in the server, but interface is defined for applications
|
|
296 |
to use. See WorkLog 4098.
|
|
297 |
*/
|
|
298 |
#define SERVER_QUERY_WAS_SLOW 1024
|
|
299 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
300 |
#define DRIZZLE_ERRMSG_SIZE 512
|
301 |
#define NET_READ_TIMEOUT 30 /* Timeout on read */ |
|
302 |
#define NET_WRITE_TIMEOUT 60 /* Timeout on write */ |
|
303 |
#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ |
|
1
by brian
clean slate |
304 |
|
305 |
#define ONLY_KILL_QUERY 1
|
|
306 |
||
307 |
#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */ |
|
308 |
#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */ |
|
309 |
#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */ |
|
310 |
#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */ |
|
311 |
#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ |
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
312 |
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ |
313 |
#define MAX_BLOB_WIDTH 16777216 /* Default width for blob */ |
|
1
by brian
clean slate |
314 |
|
264.2.4
by Andrey Hristov
Remove support for the old, pre-4.1, protocol |
315 |
#define DRIZZLE_PROTOCOL_NO_MORE_DATA 0xFE
|
316 |
||
317 |
||
1
by brian
clean slate |
318 |
|
319 |
||
77.1.78
by Monty Taylor
One last bunch of warnings edits. |
320 |
#define packet_error (~(uint32_t) 0)
|
1
by brian
clean slate |
321 |
|
322 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
323 |
/* Shutdown/kill enums and constants */
|
1
by brian
clean slate |
324 |
|
325 |
/* Bits for THD::killable. */
|
|
319.1.1
by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_ |
326 |
#define DRIZZLE_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
|
327 |
#define DRIZZLE_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
|
|
328 |
#define DRIZZLE_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
|
|
329 |
#define DRIZZLE_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
|
|
1
by brian
clean slate |
330 |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
331 |
/* Start TINY at 1 because we removed DECIMAL from off the front of the enum */
|
520.1.24
by Monty Taylor
Fixed the TINY=1 bit. |
332 |
enum enum_field_types { DRIZZLE_TYPE_TINY, |
398
by Brian Aker
Remove short. |
333 |
DRIZZLE_TYPE_LONG, |
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
334 |
DRIZZLE_TYPE_DOUBLE, |
575.5.1
by David Axmark
Changed NEWDATE to DATE. One failing test but I think its somewhere else in the code |
335 |
DRIZZLE_TYPE_NULL, |
336 |
DRIZZLE_TYPE_TIMESTAMP, |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
337 |
DRIZZLE_TYPE_LONGLONG, |
399
by Brian Aker
Removed dead datatype (even dead in original server...). Mindless 6:30AM |
338 |
DRIZZLE_TYPE_TIME, |
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
339 |
DRIZZLE_TYPE_DATETIME, |
575.5.1
by David Axmark
Changed NEWDATE to DATE. One failing test but I think its somewhere else in the code |
340 |
DRIZZLE_TYPE_DATE, |
341 |
DRIZZLE_TYPE_VARCHAR, |
|
342 |
DRIZZLE_TYPE_VIRTUAL, |
|
520.1.25
by Monty Taylor
Removed the split. |
343 |
DRIZZLE_TYPE_NEWDECIMAL, |
344 |
DRIZZLE_TYPE_ENUM, |
|
345 |
DRIZZLE_TYPE_BLOB, |
|
346 |
DRIZZLE_TYPE_MAX=DRIZZLE_TYPE_BLOB |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
347 |
};
|
348 |
||
1
by brian
clean slate |
349 |
|
350 |
enum enum_cursor_type |
|
351 |
{
|
|
352 |
CURSOR_TYPE_NO_CURSOR= 0, |
|
353 |
CURSOR_TYPE_READ_ONLY= 1, |
|
354 |
CURSOR_TYPE_FOR_UPDATE= 2, |
|
355 |
CURSOR_TYPE_SCROLLABLE= 4 |
|
356 |
};
|
|
357 |
||
358 |
||
359 |
/* options for mysql_set_option */
|
|
206.3.1
by Patrick Galbraith
Most everything working with client rename |
360 |
enum enum_drizzle_set_option |
1
by brian
clean slate |
361 |
{
|
319.1.1
by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_ |
362 |
DRIZZLE_OPTION_MULTI_STATEMENTS_ON, |
363 |
DRIZZLE_OPTION_MULTI_STATEMENTS_OFF
|
|
1
by brian
clean slate |
364 |
};
|
365 |
||
366 |
#define net_new_transaction(net) ((net)->pkt_nr=0)
|
|
367 |
||
368 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
369 |
/* The following is for user defined functions */
|
1
by brian
clean slate |
370 |
|
371 |
enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, |
|
372 |
DECIMAL_RESULT}; |
|
373 |
||
374 |
typedef struct st_udf_args |
|
375 |
{
|
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
376 |
unsigned int arg_count; /* Number of arguments */ |
377 |
enum Item_result *arg_type; /* Pointer to item_results */ |
|
378 |
char **args; /* Pointer to argument */ |
|
379 |
unsigned long *lengths; /* Length of string arguments */ |
|
380 |
char *maybe_null; /* Set to 1 for all maybe_null args */ |
|
1
by brian
clean slate |
381 |
char **attributes; /* Pointer to attribute name */ |
382 |
unsigned long *attribute_lengths; /* Length of attribute arguments */ |
|
383 |
void *extension; |
|
384 |
} UDF_ARGS; |
|
385 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
386 |
/* This holds information about the result */
|
1
by brian
clean slate |
387 |
|
388 |
typedef struct st_udf_init |
|
389 |
{
|
|
277
by Brian Aker
Cleanup of my_bool from extra and libdrizzle |
390 |
bool maybe_null; /* 1 if function can return NULL */ |
1
by brian
clean slate |
391 |
unsigned int decimals; /* for real functions */ |
392 |
unsigned long max_length; /* For string functions */ |
|
393 |
char *ptr; /* free pointer for function data */ |
|
277
by Brian Aker
Cleanup of my_bool from extra and libdrizzle |
394 |
bool const_item; /* 1 if function always returns the same value */ |
1
by brian
clean slate |
395 |
void *extension; |
396 |
} UDF_INIT; |
|
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
397 |
/*
|
398 |
TODO: add a notion for determinism of the UDF.
|
|
1
by brian
clean slate |
399 |
See Item_udf_func::update_used_tables ()
|
400 |
*/
|
|
401 |
||
520.1.28
by Monty Taylor
Reverted too-big formatting change. |
402 |
/* Constants when using compression */
|
403 |
#define NET_HEADER_SIZE 4 /* standard header size */ |
|
404 |
#define COMP_HEADER_SIZE 3 /* compression header extra size */ |
|
1
by brian
clean slate |
405 |
|
406 |
||
294
by Brian Aker
libdrizzle has ulong removed. |
407 |
#define NULL_LENGTH UINT32_MAX /* For net_store_length */ |
1
by brian
clean slate |
408 |
|
409 |
#endif
|