~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_create.h

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

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