~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/common_includes.h

  • Committer: Monty Taylor
  • Date: 2008-10-30 18:44:27 UTC
  • mto: (520.4.35 devel)
  • mto: This revision was merged to the branch mainline in revision 572.
  • Revision ID: monty@inaugust.com-20081030184427-7cr1v6r5cqnuqm3v
Removed global sql_array.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
19
 
 
20
/**
 
21
 * @file
 
22
 *
 
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
 
29
 * #ifdef DRIZZLE_SERVER blocks which made it very difficult to determine
 
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
 
 
38
 
 
39
/* Cross-platform portability code and standard includes */
 
40
#include <drizzled/global.h>
 
41
/* Lots of system-wide struct definitions like IO_CACHE,
 
42
   prototypes for all my_* functions */
 
43
#include <mysys/my_sys.h>
 
44
/* Custom C string functions */
 
45
#include <mystrings/m_string.h>
 
46
/* Defines for the storage engine handler -- i.e. HA_XXX defines */
 
47
#include <drizzled/base.h>                                      /* Needed by field.h */
 
48
/* The <strong>INTERNAL</strong> plugin API - not the external, or public, server plugin API */
 
49
#include "sql_plugin.h"
 
50
/* Contains system-wide constants and #defines */
 
51
#include <drizzled/definitions.h>
 
52
/* System-wide common data structures */
 
53
#include <drizzled/structs.h>
 
54
 
 
55
 
 
56
/**
 
57
 * @TODO Move the following into a drizzled.h header?
 
58
 *
 
59
 * I feel that global variables and functions referencing them directly
 
60
 * and that are used only in the server should be separated out into 
 
61
 * a drizzled.h header file -- JRP
 
62
 */
 
63
 
 
64
 
 
65
extern const CHARSET_INFO *system_charset_info, *files_charset_info ;
 
66
extern const CHARSET_INFO *national_charset_info, *table_alias_charset;
 
67
 
 
68
extern pthread_key_t THR_Session;
 
69
inline Session *_current_session(void)
 
70
{
 
71
  return (Session *)pthread_getspecific(THR_Session);
 
72
}
 
73
#define current_session _current_session()
 
74
 
 
75
 
 
76
/* Custom C++-style String class API */
 
77
#include <drizzled/sql_string.h>
 
78
/* Custom singly-linked list lite struct and full-blown type-safe, templatized class */
 
79
#include <drizzled/sql_list.h>
 
80
#include "handler.h"
 
81
#include <drizzled/table_list.h>
 
82
/* Drizzle server data type class definitions */
 
83
#include <drizzled/field.h>
 
84
#include "item.h"
 
85
 
 
86
 
 
87
#include "sql_class.h"
 
88
 
 
89
 
 
90
#endif /* DRIZZLE_SERVER_COMMON_INCLUDES_H */