~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_create.h

  • Committer: Monty Taylor
  • Date: 2009-08-17 18:46:08 UTC
  • mto: (1182.1.1 staging)
  • mto: This revision was merged to the branch mainline in revision 1183.
  • Revision ID: mordred@inaugust.com-20090817184608-0b2emowpjr9m6le7
"Fixed" the deadlock test. I'd still like someone to look at what's going on here.

Show diffs side-by-side

added added

removed removed

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