~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/alter_drop.h

  • Committer: Monty Taylor
  • Date: 2009-01-06 18:48:07 UTC
  • mto: This revision was merged to the branch mainline in revision 762.
  • Revision ID: mordred@inaugust.com-20090106184807-cen092lvb8mc3z4k
Enabled deadlock_innodb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
 
20
 
20
21
#ifndef DRIZZLED_ALTER_DROP_H
21
22
#define DRIZZLED_ALTER_DROP_H
22
23
 
23
 
#include "drizzled/memory/sql_alloc.h"
24
 
 
25
 
namespace drizzled
26
 
{
27
 
 
28
 
namespace memory { class Root; }
 
24
#include <drizzled/sql_alloc.h>
29
25
 
30
26
class Item;
 
27
typedef struct st_mem_root MEM_ROOT;
31
28
 
32
 
class AlterDrop :public memory::SqlAlloc {
 
29
class Alter_drop :public Sql_alloc {
33
30
public:
34
 
  enum drop_type
35
 
  {
36
 
    KEY,
37
 
    COLUMN,
38
 
    FOREIGN_KEY
39
 
  };
 
31
  enum drop_type {KEY, COLUMN };
40
32
  const char *name;
41
33
  enum drop_type type;
42
 
  AlterDrop(enum drop_type par_type,
43
 
            const char *par_name) :
44
 
    name(par_name),
45
 
    type(par_type)
46
 
  {}
 
34
  Alter_drop(enum drop_type par_type,const char *par_name)
 
35
    :name(par_name), type(par_type) {}
47
36
  /**
48
37
    Used to make a clone of this object for ALTER/CREATE TABLE
49
38
    @sa comment for Key_part_spec::clone
50
39
  */
51
 
  AlterDrop *clone(memory::Root *mem_root) const
52
 
  {
53
 
    return new (mem_root) AlterDrop(*this);
54
 
  }
 
40
  Alter_drop *clone(MEM_ROOT *mem_root) const
 
41
    { return new (mem_root) Alter_drop(*this); }
55
42
};
56
43
 
57
 
} /* namespace drizzled */
58
44
 
59
45
#endif /* DRIZZLED_ALTER_DROP_H */