~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/alter_info.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

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) 2009 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; either version 2 of the License, or
9
 
 *  (at your option) any later version.
10
 
 *
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.
15
 
 *
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
19
 
 */
20
 
 
21
 
/**
22
 
 * @file Declaration of the AlterInfo class
23
 
 */
24
 
 
25
 
#ifndef DRIZZLED_ALTER_INFO_H
26
 
#define DRIZZLED_ALTER_INFO_H
27
 
 
28
 
#include "drizzled/base.h"
29
 
#include "drizzled/enum.h"
30
 
#include "drizzled/sql_list.h" /** @TODO use STL vectors! */
31
 
#include "drizzled/key.h"
32
 
#include "drizzled/message/table.pb.h"
33
 
 
34
 
#include <bitset>
35
 
 
36
 
namespace drizzled
37
 
{
38
 
 
39
 
/* Some forward declarations needed */
40
 
class CreateField;
41
 
class AlterDrop;
42
 
class AlterColumn;
43
 
 
44
 
enum enum_alter_info_flags
45
 
{
46
 
  ALTER_ADD_COLUMN= 0,
47
 
  ALTER_DROP_COLUMN,
48
 
  ALTER_CHANGE_COLUMN,
49
 
  ALTER_COLUMN_STORAGE,
50
 
  ALTER_COLUMN_FORMAT,
51
 
  ALTER_COLUMN_ORDER,
52
 
  ALTER_ADD_INDEX,
53
 
  ALTER_DROP_INDEX,
54
 
  ALTER_RENAME,
55
 
  ALTER_ORDER,
56
 
  ALTER_OPTIONS,
57
 
  ALTER_COLUMN_DEFAULT,
58
 
  ALTER_KEYS_ONOFF,
59
 
  ALTER_STORAGE,
60
 
  ALTER_ROW_FORMAT,
61
 
  ALTER_CONVERT,
62
 
  ALTER_FORCE,
63
 
  ALTER_RECREATE,
64
 
  ALTER_TABLE_REORG,
65
 
  ALTER_FOREIGN_KEY
66
 
};
67
 
 
68
 
enum tablespace_op_type
69
 
{
70
 
  NO_TABLESPACE_OP,
71
 
  DISCARD_TABLESPACE,
72
 
  IMPORT_TABLESPACE
73
 
};
74
 
 
75
 
/**
76
 
 * Contains information about the parsed CREATE or ALTER TABLE statement.
77
 
 *
78
 
 * This structure contains a list of columns or indexes to be created,
79
 
 * altered or dropped.
80
 
 */
81
 
class AlterInfo
82
 
{
83
 
public:
84
 
  List<AlterDrop> drop_list;
85
 
  List<AlterColumn> alter_list;
86
 
  List<Key> key_list;
87
 
  List<CreateField> create_list;
88
 
  message::AlterTable alter_proto;
89
 
  std::bitset<32> flags;
90
 
  enum enum_enable_or_disable keys_onoff;
91
 
  enum tablespace_op_type tablespace_op;
92
 
  uint32_t no_parts;
93
 
  enum ha_build_method build_method;
94
 
  CreateField *datetime_field;
95
 
  bool error_if_not_empty;
96
 
 
97
 
  AlterInfo();
98
 
  AlterInfo(const AlterInfo &rhs, memory::Root *mem_root);
99
 
private:
100
 
  AlterInfo &operator=(const AlterInfo &rhs); // not implemented
101
 
  AlterInfo(const AlterInfo &rhs);            // not implemented
102
 
};
103
 
 
104
 
} /* namespace drizzled */
105
 
 
106
 
#endif /* DRIZZLED_ALTER_INFO_H */