~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.h

  • Committer: Brian Aker
  • Date: 2010-09-22 22:29:55 UTC
  • mto: (1787.3.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1789.
  • Revision ID: brian@tangent.org-20100922222955-cg1bddv4b72jwe31
Fix enum at being an intefer (which is what PG did, and it saves on
alignment issues).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <drizzled/statement.h>
25
25
#include <drizzled/message/schema.pb.h>
26
 
#include <uuid/uuid.h>
27
26
 
28
27
namespace drizzled
29
28
{
34
33
 
35
34
class CreateSchema : public Statement
36
35
{
37
 
  bool check(const SchemaIdentifier &identifier);
38
 
 
39
36
public:
40
 
  CreateSchema(Session *in_session) :
41
 
    Statement(in_session),
42
 
    is_if_not_exists(false)
 
37
  CreateSchema(Session *in_session)
 
38
    :
 
39
      Statement(in_session),
 
40
      is_if_not_exists(false)
43
41
  {
44
42
    schema_message.set_creation_timestamp(time(NULL));
45
43
    schema_message.set_update_timestamp(time(NULL));
46
 
 
47
 
    /* 36 characters for uuid string +1 for NULL */
48
 
    uuid_t uu;
49
 
    char uuid_string[37];
50
 
    uuid_generate_random(uu);
51
 
    uuid_unparse(uu, uuid_string);
52
 
    schema_message.set_uuid(uuid_string, 36);
53
 
 
54
 
    schema_message.set_version(1);
55
44
  }
56
45
 
57
46
  bool execute();