~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_table.cc

  • Committer: Mark Atwood
  • Date: 2011-10-14 15:59:08 UTC
  • mfrom: (2430.1.12 refactor3a)
  • Revision ID: me@mark.atwood.name-20111014155908-whqmrmaf2grpsg5c
mergeĀ lp:~olafvdspek/drizzle/refactor3

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include <iostream>
34
34
 
35
 
namespace drizzled
36
 
{
37
 
 
 
35
namespace drizzled {
38
36
namespace statement {
39
37
 
40
38
CreateTable::CreateTable(Session *in_session, Table_ident *ident, bool is_temporary) :
49
47
  create_table_list(NULL)
50
48
{
51
49
  set_command(SQLCOM_CREATE_TABLE);
52
 
  createTableMessage().set_name(ident->table.str, ident->table.length);
 
50
  createTableMessage().set_name(ident->table.data(), ident->table.size());
53
51
#if 0
54
 
  createTableMessage().set_schema(ident->db.str, ident->db.length);
 
52
  createTableMessage().set_schema(ident->db.data(), ident->db.size());
55
53
#endif
56
54
 
57
 
  if (is_temporary)
58
 
  {
59
 
    createTableMessage().set_type(message::Table::TEMPORARY);
60
 
  }
61
 
  else
62
 
  {
63
 
    createTableMessage().set_type(message::Table::STANDARD);
64
 
  }
 
55
  createTableMessage().set_type(is_temporary ? message::Table::TEMPORARY : message::Table::STANDARD);
65
56
}
66
57
 
67
58
CreateTable::CreateTable(Session *in_session) :
338
329
}
339
330
 
340
331
} /* namespace drizzled */
341