1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems
4
* Copyright (C) 2009 Sun Microsystems, Inc.
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
34
34
class CreateTable : public Statement
36
virtual bool check(const identifier::Table&);
37
CreateTable(Session *in_session)
39
Statement(in_session),
40
is_create_table_like(false),
41
is_if_not_exists(false),
39
CreateTable(Session *in_session, Table_ident *ident, bool is_temporary);
40
CreateTable(Session *in_session);
42
virtual bool is_alter() const
44
memset(&create_info, 0, sizeof(create_info));
46
create_table_message.set_creation_timestamp(time(NULL));
47
create_table_message.set_update_timestamp(time(NULL));
51
message::Table create_table_message;
49
virtual bool executeInner(identifier::Table::const_reference);
52
52
message::Table &createTableMessage()
54
return create_table_message;
54
return *getSession()->lex->table();
56
message::Table::Field *current_proto_field;
57
HA_CREATE_INFO create_info;
58
HA_CREATE_INFO _create_info;
62
HA_CREATE_INFO &create_info()
64
if (createTableMessage().options().auto_increment_value())
66
_create_info.auto_increment_value= createTableMessage().options().auto_increment_value();
67
_create_info.used_fields|= HA_CREATE_USED_AUTO;
58
73
AlterInfo alter_info;
59
74
KEY_CREATE_INFO key_create_info;
60
75
message::Table::ForeignKeyConstraint::ForeignKeyMatchOption fk_match_option;