~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_create.h

  • Committer: Brian Aker
  • Date: 2009-08-18 07:19:56 UTC
  • mfrom: (1116.1.3 stewart)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090818071956-nfpoe9rp3i7p50kx
Merge my branch from Stewart into one branch

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_SELECT_CREATE_H
21
22
#define DRIZZLED_SELECT_CREATE_H
22
23
 
23
 
#include <drizzled/select_insert.h>
24
 
 
25
 
namespace drizzled
26
 
{
27
 
 
28
24
class select_create: public select_insert {
29
 
  Order *group;
 
25
  order_st *group;
30
26
  TableList *create_table;
31
 
  bool is_if_not_exists;
32
27
  HA_CREATE_INFO *create_info;
33
 
  message::Table &table_proto;
 
28
  drizzled::message::Table *table_proto;
34
29
  TableList *select_tables;
35
 
  AlterInfo *alter_info;
 
30
  Alter_info *alter_info;
36
31
  Field **field;
37
32
  /* lock data for tmp table */
38
 
  DrizzleLock *m_lock;
 
33
  DRIZZLE_LOCK *m_lock;
39
34
  /* m_lock or session->extra_lock */
40
 
  DrizzleLock **m_plock;
41
 
  identifier::Table::const_reference identifier;
42
 
 
 
35
  DRIZZLE_LOCK **m_plock;
43
36
public:
44
37
  select_create (TableList *table_arg,
45
 
                 bool is_if_not_exists_arg,
46
 
                 HA_CREATE_INFO *create_info_par,
47
 
                 message::Table &proto,
48
 
                 AlterInfo *alter_info_arg,
49
 
                 List<Item> &select_fields,enum_duplicates duplic, bool ignore,
50
 
                 TableList *select_tables_arg,
51
 
                 identifier::Table::const_reference identifier_arg)
 
38
                 HA_CREATE_INFO *create_info_par,
 
39
                 drizzled::message::Table *proto,
 
40
                 Alter_info *alter_info_arg,
 
41
                 List<Item> &select_fields,enum_duplicates duplic, bool ignore,
 
42
                 TableList *select_tables_arg)
52
43
    :select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore),
53
44
    create_table(table_arg),
54
 
    is_if_not_exists(is_if_not_exists_arg),
55
45
    create_info(create_info_par),
56
46
    table_proto(proto),
57
47
    select_tables(select_tables_arg),
58
48
    alter_info(alter_info_arg),
59
 
    m_plock(NULL),
60
 
    identifier(identifier_arg)
 
49
    m_plock(NULL)
61
50
    {}
62
51
  int prepare(List<Item> &list, Select_Lex_Unit *u);
63
52
 
64
53
  void store_values(List<Item> &values);
65
 
  void send_error(drizzled::error_t errcode,const char *err);
 
54
  void send_error(uint32_t errcode,const char *err);
66
55
  bool send_eof();
67
56
  void abort();
68
 
  virtual bool can_rollback_data() { return true; }
 
57
  virtual bool can_rollback_data() { return 1; }
69
58
 
70
59
  // Needed for access from local class MY_HOOKS in prepare(), since session is proteted.
71
60
  const Session *get_session(void) { return session; }
72
 
  const HA_CREATE_INFO *get_create_info() { return create_info; }
 
61
  const HA_CREATE_INFO *get_create_info() { return create_info; };
73
62
  int prepare2(void) { return 0; }
74
63
};
75
64
 
76
 
} /* namespace drizzled */
77
 
 
78
65
#endif /* DRIZZLED_SELECT_CREATE_H */