~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_table.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:
21
21
#ifndef DRIZZLED_STATEMENT_CREATE_TABLE_H
22
22
#define DRIZZLED_STATEMENT_CREATE_TABLE_H
23
23
 
24
 
#include "drizzled/statement.h"
25
 
#include "drizzled/foreign_key.h"
 
24
#include <drizzled/statement.h>
 
25
 
 
26
class Session;
26
27
 
27
28
namespace drizzled
28
29
{
29
 
class Session;
30
 
 
31
30
namespace statement
32
31
{
33
32
 
36
35
public:
37
36
  CreateTable(Session *in_session)
38
37
    :
39
 
      Statement(in_session),
40
 
      is_create_table_like(false),
41
 
      is_if_not_exists(false),
42
 
      is_engine_set(false)
43
 
  {
44
 
    memset(&create_info, 0, sizeof(create_info));
45
 
 
46
 
    create_table_message.set_creation_timestamp(time(NULL));
47
 
    create_table_message.set_update_timestamp(time(NULL));
48
 
  }
 
38
      Statement(in_session, SQLCOM_CREATE_TABLE)
 
39
  {}
49
40
 
50
41
  bool execute();
51
 
  message::Table create_table_message;
52
 
  message::Table &createTableMessage()
53
 
  {
54
 
    return create_table_message;
55
 
  };
56
 
  message::Table::Field *current_proto_field;
57
 
  HA_CREATE_INFO create_info;
58
 
  AlterInfo alter_info;
59
 
  KEY_CREATE_INFO key_create_info;
60
 
  enum Foreign_key::fk_match_opt fk_match_option;
61
 
  enum Foreign_key::fk_option fk_update_opt;
62
 
  enum Foreign_key::fk_option fk_delete_opt;
63
 
 
64
 
  /* The text in a CHANGE COLUMN clause in ALTER TABLE */
65
 
  char *change;
66
 
 
67
 
  /* An item representing the DEFAULT clause in CREATE/ALTER TABLE */
68
 
  Item *default_value;
69
 
 
70
 
  /* An item representing the ON UPDATE clause in CREATE/ALTER TABLE */
71
 
  Item *on_update_value;
72
 
 
73
 
  enum column_format_type column_format;
74
 
 
75
 
  /* Poly-use */
76
 
  LEX_STRING comment;
77
 
 
78
 
  bool is_create_table_like;
79
 
  bool is_if_not_exists;
80
 
  bool is_engine_set;
81
42
};
82
43
 
83
 
} /* namespace statement */
 
44
} /* end namespace statement */
84
45
 
85
 
} /* namespace drizzled */
 
46
} /* end namespace drizzled */
86
47
 
87
48
#endif /* DRIZZLED_STATEMENT_CREATE_TABLE_H */