~drizzle-trunk/drizzle/development

575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
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
#ifndef DRIZZLED_HANDLER_STRUCTS_H
21
#define DRIZZLED_HANDLER_STRUCTS_H
22
1241.9.28 by Monty Taylor
Removed global_charset_info.h from server_includes.h
23
#if TIME_WITH_SYS_TIME
24
# include <sys/time.h>
25
# include <time.h>
26
#else
27
# if HAVE_SYS_TIME_H
28
#  include <sys/time.h>
29
# else
30
#  include <time.h>
31
# endif
32
#endif
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
33
34
#include <drizzled/base.h>
35
#include <drizzled/structs.h>
36
#include <drizzled/definitions.h>
37
#include <drizzled/lex_string.h>
1241.9.28 by Monty Taylor
Removed global_charset_info.h from server_includes.h
38
#include "drizzled/global_charset_info.h"
39
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
40
namespace drizzled
41
{
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
42
1130.1.4 by Monty Taylor
Moved StorageEngine into plugin namespace.
43
namespace plugin
44
{
45
class StorageEngine;
46
}
47
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
48
typedef struct st_ha_create_information
49
{
50
  const CHARSET_INFO *table_charset, *default_table_charset;
51
  const char *alias;
52
  uint64_t auto_increment_value;
53
  uint32_t table_options;
54
  uint32_t used_fields;
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
55
  plugin::StorageEngine *db_type;
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
56
  bool table_existed;			/* 1 in create if table existed */
1689.3.6 by Brian Aker
Update for HEAP to convert its lock to boost.
57
58
  st_ha_create_information() :
59
    table_charset(0),
60
    default_table_charset(0),
61
    alias(0),
62
    auto_increment_value(0),
63
    table_options(0),
64
    used_fields(0),
65
    db_type(0),
66
    table_existed(0)
67
  { }
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
68
} HA_CREATE_INFO;
69
70
typedef struct st_ha_alter_information
71
{
1535 by Brian Aker
Rename of KEY to KeyInfo
72
  KeyInfo  *key_info_buffer;
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
73
  uint32_t key_count;
74
  uint32_t index_drop_count;
75
  uint32_t *index_drop_buffer;
76
  uint32_t index_add_count;
77
  uint32_t *index_add_buffer;
78
  void *data;
1711.6.5 by Brian Aker
Updating so that structures have constructor (removed memset calls).
79
80
  st_ha_alter_information() :
81
    key_info_buffer(0),
82
    key_count(0),
83
    index_drop_count(0),
84
    index_drop_buffer(0),
85
    index_add_count(0),
86
    index_add_buffer(0),
87
    data(0)
88
  { }
89
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
90
} HA_ALTER_INFO;
91
92
93
typedef struct st_key_create_information
94
{
95
  enum ha_key_alg algorithm;
96
  uint32_t block_size;
97
  LEX_STRING comment;
98
} KEY_CREATE_INFO;
99
100
101
typedef struct st_ha_check_opt
102
{
103
  st_ha_check_opt() {}                        /* Remove gcc warning */
104
} HA_CHECK_OPT;
105
106
107
typedef struct st_range_seq_if
108
{
109
  /*
110
    Initialize the traversal of range sequence
111
112
    SYNOPSIS
113
    init()
114
    init_params  The seq_init_param parameter
115
    n_ranges     The number of ranges obtained
116
    flags        A combination of HA_MRR_SINGLE_POINT, HA_MRR_FIXED_KEY
117
118
    RETURN
119
    An opaque value to be used as RANGE_SEQ_IF::next() parameter
120
  */
121
  range_seq_t (*init)(void *init_params, uint32_t n_ranges, uint32_t flags);
122
123
124
  /*
125
    Get the next range in the range sequence
126
127
    SYNOPSIS
128
    next()
129
    seq    The value returned by RANGE_SEQ_IF::init()
130
    range  OUT Information about the next range
131
132
    RETURN
133
    0 - Ok, the range structure filled with info about the next range
134
    1 - No more ranges
135
  */
136
  uint32_t (*next) (range_seq_t seq, KEY_MULTI_RANGE *range);
137
} RANGE_SEQ_IF;
138
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
139
} /* namespace drizzled */
140
575.1.3 by Monty Taylor
Moved some stuff out of handler.h.
141
#endif /* DRIZZLED_HANDLER_STRUCTS_H */