~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.h

  • Committer: Brian Aker
  • Date: 2011-01-22 07:12:16 UTC
  • mfrom: (2096.1.16 alter-table)
  • Revision ID: brian@tangent.org-20110122071216-j0e8bwecb1cqefm9
Merge in work for parser cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
class Key :public memory::SqlAlloc {
42
42
public:
43
43
  enum Keytype { PRIMARY, UNIQUE, MULTIPLE, FOREIGN_KEY};
44
 
  enum Keytype type;
 
44
  Keytype type;
45
45
  KEY_CREATE_INFO key_create_info;
46
46
  List<Key_part_spec> columns;
47
47
  LEX_STRING name;
48
48
  bool generated;
49
49
 
50
 
  Key(enum Keytype type_par, const LEX_STRING &name_arg,
 
50
  Key(Keytype type_par,
 
51
      const lex_string_t &name_arg,
51
52
      KEY_CREATE_INFO *key_info_arg,
52
 
      bool generated_arg, List<Key_part_spec> &cols)
53
 
    :type(type_par), key_create_info(*key_info_arg), columns(cols),
54
 
    name(name_arg), generated(generated_arg)
 
53
      bool generated_arg, List<Key_part_spec> &cols) :
 
54
    type(type_par),
 
55
    key_create_info(*key_info_arg),
 
56
    columns(cols),
 
57
    name(name_arg),
 
58
    generated(generated_arg)
55
59
  {}
56
 
  Key(enum Keytype type_par, const char *name_arg, size_t name_len_arg,
57
 
      KEY_CREATE_INFO *key_info_arg, bool generated_arg,
58
 
      List<Key_part_spec> &cols)
59
 
    :type(type_par), key_create_info(*key_info_arg), columns(cols),
 
60
 
 
61
  Key(Keytype type_par,
 
62
      const char *name_arg,
 
63
      size_t name_len_arg,
 
64
      KEY_CREATE_INFO *key_info_arg,
 
65
      bool generated_arg,
 
66
      List<Key_part_spec> &cols) :
 
67
    type(type_par),
 
68
    key_create_info(*key_info_arg),
 
69
    columns(cols),
60
70
    generated(generated_arg)
61
71
  {
62
72
    name.str= const_cast<char *>(name_arg);