~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/replication_event_writer.cc

  • Committer: Jay Pipes
  • Date: 2009-04-10 05:31:39 UTC
  • mto: (971.1.47 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: jpipes@serialcoder-20090410053139-beat1rbcopkcgc4n
Changes libserialize to libdrizzledmessage per ML discussion.  All GPB messages are now in the drizzled::message namespace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <string>
8
8
#include <uuid/uuid.h>
9
9
 
10
 
#include <drizzled/serialize/replication_event.pb.h>
 
10
#include <drizzled/message/replication_event.pb.h>
11
11
 
12
12
using namespace std;
13
 
using namespace drizzle;
 
13
using namespace drizzled::message;
14
14
 
15
15
static uint64_t query_id= 0;
16
16
char transaction_id[37];
19
19
  Example script for reader a Drizzle master replication list.
20
20
*/
21
21
 
22
 
void write_ddl(::drizzle::Event *record, const char *sql)
 
22
void write_ddl(::drizzled::message::Event *record, const char *sql)
23
23
{
24
24
  uuid_t uu;
25
25
 
35
35
  record->set_sql(sql);
36
36
}
37
37
 
38
 
void write_insert(::drizzle::Event *record, const char *trx)
 
38
void write_insert(::drizzled::message::Event *record, const char *trx)
39
39
{
40
40
  Event::Value *value;
41
41
 
60
60
  value->add_val("2");
61
61
}
62
62
 
63
 
void write_delete(::drizzle::Event *record, const char *trx)
 
63
void write_delete(::drizzled::message::Event *record, const char *trx)
64
64
{
65
65
  Event::Value *value;
66
66
 
82
82
  value->add_val("2");
83
83
}
84
84
 
85
 
void write_update(::drizzle::Event *record, const char *trx)
 
85
void write_update(::drizzled::message::Event *record, const char *trx)
86
86
{
87
87
  Event::Value *value;
88
88
 
110
110
  value->add_val("6");
111
111
}
112
112
 
113
 
void write_to_disk(int file, ::drizzle::EventList *list)
 
113
void write_to_disk(int file, ::drizzled::message::EventList *list)
114
114
{
115
115
  std::string buffer;
116
116
  size_t length;