~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.h

  • Committer: LinuxJedi
  • Date: 2010-08-28 09:23:52 UTC
  • mto: (1738.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1739.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100828092352-oe3zbtdy05kq9dtq
Make exit happen in main thread rather than signal handler thread thus avoiding a segfault due to a double kill of the signal handler thread

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();