1
/* Copyright (C) 2000 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 MySQL
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
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
22
** Common definition between mysql server & client
25
#ifndef _libdrizzle_drizzle_com_h
26
#define _libdrizzle_drizzle_com_h
23
28
#define HOSTNAME_LENGTH 60
24
29
#define SYSTEM_CHARSET_MBMAXLEN 4
86
91
#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
87
92
#define BLOB_FLAG 16 /* Field is a blob */
88
93
#define UNSIGNED_FLAG 32 /* Field is unsigned */
89
#define ZEROFILL_FLAG 64 /* Field is zerofill */
94
#define DECIMAL_FLAG 64 /* Field is zerofill */
90
95
#define BINARY_FLAG 128 /* Field is binary */
92
97
/* The following are only sent to new clients */
266
271
#define packet_error (~(uint32_t) 0)
268
273
/* Start TINY at 1 because we removed DECIMAL from off the front of the enum */
269
enum enum_field_types { MYSQL_TYPE_TINY=1,
270
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
272
MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
274
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
275
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
276
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
277
MYSQL_TYPE_NEWDECIMAL=250,
281
MYSQL_TYPE_VAR_STRING=254,
282
MYSQL_TYPE_STRING=255
274
enum enum_field_types { DRIZZLE_TYPE_TINY=1,
275
DRIZZLE_TYPE_SHORT, DRIZZLE_TYPE_LONG,
277
DRIZZLE_TYPE_NULL, DRIZZLE_TYPE_TIMESTAMP,
278
DRIZZLE_TYPE_LONGLONG,
279
DRIZZLE_TYPE_DATE, DRIZZLE_TYPE_TIME,
280
DRIZZLE_TYPE_DATETIME,
281
DRIZZLE_TYPE_NEWDATE, DRIZZLE_TYPE_VARCHAR,
282
DRIZZLE_TYPE_NEWDECIMAL=252,
283
DRIZZLE_TYPE_ENUM=253,
284
DRIZZLE_TYPE_SET=254,
285
DRIZZLE_TYPE_BLOB=255
285
/* For backward compatibility */
286
#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
287
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
288
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
289
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
290
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
291
#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
292
#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
293
#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
294
#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
295
#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
296
#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
297
#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
298
#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
299
#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
300
#define FIELD_TYPE_SET MYSQL_TYPE_SET
301
#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
302
#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
303
#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
304
#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
305
#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
306
#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
309
289
/* Shutdown/kill enums and constants */