21
21
mysqlbinlog too (definition of SELECT_DISTINCT and others).
22
22
The consequence is that 90% of the file is wrapped in \#ifndef MYSQL_CLIENT,
23
23
except the part which must be in the server and in the client.
25
@TODO Name this file better. "priv" could mean private, privileged, privileges.
27
@TODO Get rid of the MYSQL_CLIENT and MYSQL_SERVER conditionals
26
30
#ifndef DRIZZLE_SERVER_MYSQL_PRIV_H
29
33
#ifndef MYSQL_CLIENT
31
#include <drizzled/global.h>
32
#include <drizzled/version.h>
33
#include <mysys/my_sys.h>
35
/* Cross-platform portability code and standard includes */
36
#include <drizzled/global.h>
37
/* Server versioning information and defines */
38
#include <drizzled/version.h>
39
/* Lots of system-wide struct definitions like IO_CACHE, DYNAMIC_STRING, prototypes for all my_* functions */
40
#include <mysys/my_sys.h>
41
/* Convenience functions for working with times */
34
42
#include <libdrizzle/my_time.h>
43
/* Custom C string functions */
35
44
#include <mystrings/m_string.h>
36
46
#include <mysys/hash.h>
47
/* Standard signals API */
37
48
#include <signal.h>
49
/* Deadlock-free table-list lock API */
38
50
#include <mysys/thr_lock.h>
51
/* Custom error API */
39
52
#include <drizzled/error.h>
53
/* Defines for the storage engine handler -- i.e. HA_XXX defines */
40
54
#include <drizzled/base.h> /* Needed by field.h */
55
/* Custom queue API */
41
56
#include <mysys/queues.h>
42
#include <drizzled/sql_bitmap.h> /* Custom bitmap API */
57
/* Custom Bitmap API */
58
#include <drizzled/sql_bitmap.h>
59
/* Custom templatized, type-safe Dynamic_Array API */
43
60
#include "sql_array.h"
61
/* The <strong>INTERNAL</strong> plugin API - not the external, or public, server plugin API */
44
62
#include "sql_plugin.h"
63
/* The <strong>connection</strong> thread scheduler API */
45
64
#include "scheduler.h"
65
/* Network database operations (hostent, netent, servent, etc...*/
67
/* Communication API between a client and the server */
68
#include <libdrizzle/drizzle_com.h>
48
71
#define _DTRACE_VERSION 1
50
73
#include "probes.h"
55
76
Query type constants.
57
78
QT_ORDINARY -- ordinary SQL query.
58
79
QT_IS -- SQL query to be shown in INFORMATION_SCHEMA (in utf8 and without
59
80
character set introducers).
84
Move this out of here once Stew's done with UDF breakout. The following headers need it:
86
sql_lex.h --> included by sql_class.h
61
96
enum enum_query_type
67
/* TODO convert all these three maps to Bitmap classes */
103
* @TODO convert all these three maps to Bitmap classes
105
* @TODO Move these to a more appropriate header file (maps.h?). The following files use them:
113
* unireg.h (going bye bye?)
124
* Since most of these include table.h, I think that would appropriate...
68
126
typedef uint64_t table_map; /* Used for table bits in join */
69
127
#if MAX_INDEXES <= 64
70
128
typedef Bitmap<64> key_map; /* Used for finding keys */
72
130
typedef Bitmap<((MAX_INDEXES+7)/8*8)> key_map; /* Used for finding keys */
74
132
typedef uint32_t nesting_map; /* Used for flags of nesting constructs */
76
137
Used to identify NESTED_JOIN structures within a join (applicable only to
77
138
structures that have not been simplified away and embed more the one
80
typedef uint64_t nested_join_map;
83
typedef uint64_t query_id_t;
84
extern query_id_t global_query_id;
86
/* increment query_id and return it. */
87
inline query_id_t next_query_id() { return global_query_id++; }
89
/* useful constants */
141
typedef uint64_t nested_join_map; /* Needed by sql_select.h and table.h */
143
/* useful constants */#
90
144
extern const key_map key_map_empty;
91
145
extern key_map key_map_full; /* Should be threaded as const */
92
146
extern const char *primary_key_name;
94
#include <libdrizzle/drizzle_com.h>
95
148
#include <vio/violite.h>
98
150
#include <drizzled/sql_alloc.h>
153
* @TODO Move the following into a drizzled.h header?
155
* I feel that global variables and functions referencing them directly
156
* and that are used only in the server should be separated out into
157
* a drizzled.h header file -- JRP
159
typedef uint64_t query_id_t;
160
extern query_id_t global_query_id;
162
/* increment query_id and return it. */
163
inline query_id_t next_query_id() { return global_query_id++; }
100
165
#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
101
166
#define all_bits_set(A,B) ((A) & (B) != (B))