~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008 Sun Microsystems
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
8
 *  the Free Software Foundation; version 2 of the License.
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
 */
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
19
20
/**
21
 * @file
520.6.4 by Monty Taylor
Moved thr_lock.h out of common_includes.
22
 *
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
23
 * Contains #includes and definitions that apply to ALL server-related
24
 * executables, including storage engine plugins.
25
 *
26
 * @details
27
 *
28
 * Previously, the mysql_priv.h file contained a number of conditional
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
29
 * #ifdef DRIZZLE_SERVER blocks which made it very difficult to determine
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
30
 * which headers and definitions were actually necessary for plugins to 
31
 * include.  The file, and NOT mysql_priv.h, should now be the main included
32
 * header for storage engine plugins, as it contains all definitions and 
33
 * declarations needed by the plugin and nothing more.
34
 */
35
#ifndef DRIZZLE_SERVER_COMMON_INCLUDES_H
36
#define DRIZZLE_SERVER_COMMON_INCLUDES_H
37
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...
38
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
39
/* Cross-platform portability code and standard includes */
520.8.4 by Monty Taylor
Removed global sql_array.h.
40
#include <drizzled/global.h>
584.1.14 by Monty Taylor
Removed field.h from common_includes.
41
/* Contains system-wide constants and #defines */
42
#include <drizzled/definitions.h>
43
/* System-wide common data structures */
44
#include <drizzled/structs.h>
45
520.8.4 by Monty Taylor
Removed global sql_array.h.
46
/* Lots of system-wide struct definitions like IO_CACHE,
47
   prototypes for all my_* functions */
48
#include <mysys/my_sys.h>
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
49
/* Custom C string functions */
50
#include <mystrings/m_string.h>
51
/* Defines for the storage engine handler -- i.e. HA_XXX defines */
584.1.14 by Monty Taylor
Removed field.h from common_includes.
52
/* Needed by field.h */
53
#include <drizzled/base.h>
54
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
55
/* The <strong>INTERNAL</strong> plugin API - not the external, or public, server plugin API */
584.1.14 by Monty Taylor
Removed field.h from common_includes.
56
#include <drizzled/sql_plugin.h>
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
57
58
59
/**
60
 * @TODO Move the following into a drizzled.h header?
61
 *
62
 * I feel that global variables and functions referencing them directly
63
 * and that are used only in the server should be separated out into 
64
 * a drizzled.h header file -- JRP
65
 */
66
67
264.1.6 by Monty Taylor
Merged from Jay.
68
extern const CHARSET_INFO *system_charset_info, *files_charset_info ;
69
extern const CHARSET_INFO *national_charset_info, *table_alias_charset;
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
70
520.6.7 by Monty Taylor
Moved a bunch of crap out of common_includes.
71
extern pthread_key_t THR_Session;
520.1.22 by Brian Aker
Second pass of thd cleanup
72
inline Session *_current_session(void)
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
73
{
520.1.21 by Brian Aker
THD -> Session rename
74
  return (Session *)pthread_getspecific(THR_Session);
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
75
}
520.1.22 by Brian Aker
Second pass of thd cleanup
76
#define current_session _current_session()
243.1.15 by Jay Pipes
Added new non-server, non-client common includes header, new show.h and connect.h headers
77
78
79
#endif /* DRIZZLE_SERVER_COMMON_INCLUDES_H */