~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package BinaryLog;
option optimize_for = SPEED;

// Design goals:

// - Keep the name of the individual binary logs out of the files. We
//   assume that each binary log has a base name (e.g., the name of
//   the server) and a sequence number, but we do not want to tie the
//   base name

message Header {
  required uint32 server_id = 1;
  required uint32 trans_id = 2;
  required uint32 seqno = 3;
}

// Start of a binary log. Note that the name 
message Start {
  required Header header = 1;
  required uint32 server_version = 2;
  required string server_signature = 3;
}

// Chain a binary log to the next binary log
message Chain {
  required Header header = 1;
  required uint32 next = 2;            // Sequence number of next file
}

message Query {
  // Assignments to variables that are part of the query
  message Variable {
    required string name = 1;
    required string val = 2;
    // Character set?
  }

  required Header header = 1;
  repeated Variable variable = 3;
  required string query = 2;
}

message Commit {
  required Header header = 1;
}

message Rollback {
  required Header header = 1;
}