~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_table.cc

  • Committer: Brian Aker
  • Date: 2011-01-22 07:12:16 UTC
  • mfrom: (2096.1.16 alter-table)
  • Revision ID: brian@tangent.org-20110122071216-j0e8bwecb1cqefm9
Merge in work for parser cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
namespace drizzled
32
32
{
33
33
 
 
34
namespace statement {
 
35
 
 
36
CreateTable::CreateTable(Session *in_session, Table_ident *ident, bool is_temporary) :
 
37
  Statement(in_session),
 
38
  change(NULL),
 
39
  default_value(NULL),
 
40
  on_update_value(NULL),
 
41
  is_engine_set(false),
 
42
  is_create_table_like(false),
 
43
  lex_identified_temp_table(false),
 
44
  link_to_local(false),
 
45
  create_table_list(NULL)
 
46
{
 
47
  createTableMessage().set_name(ident->table.str, ident->table.length);
 
48
#if 0
 
49
  createTableMessage().set_schema(ident->db.str, ident->db.length);
 
50
#endif
 
51
 
 
52
  if (is_temporary)
 
53
  {
 
54
    createTableMessage().set_type(message::Table::TEMPORARY);
 
55
  }
 
56
  else
 
57
  {
 
58
    createTableMessage().set_type(message::Table::STANDARD);
 
59
  }
 
60
}
 
61
 
 
62
CreateTable::CreateTable(Session *in_session) :
 
63
  Statement(in_session),
 
64
  change(NULL),
 
65
  default_value(NULL),
 
66
  on_update_value(NULL),
 
67
  is_engine_set(false),
 
68
  is_create_table_like(false),
 
69
  lex_identified_temp_table(false),
 
70
  link_to_local(false),
 
71
  create_table_list(NULL)
 
72
{
 
73
}
 
74
 
 
75
} // namespace statement
 
76
 
34
77
bool statement::CreateTable::execute()
35
78
{
36
79
  TableList *first_table= (TableList *) session->lex->select_lex.table_list.first;