~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/replication_event_reader.cc

  • Committer: Brian Aker
  • Date: 2009-02-02 23:10:18 UTC
  • mfrom: (779.3.40 devel)
  • Revision ID: brian@tangent.org-20090202231018-zlp0hka6kgwy1vfy
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include <string>
7
7
#include <unistd.h>
8
8
#include <drizzled/serialize/replication_event.pb.h>
 
9
 
9
10
using namespace std;
 
11
using namespace drizzle;
10
12
 
11
13
/*
12
14
  Example reader application for master.info data.
13
15
*/
14
16
 
15
 
void printRecord(const drizzle::EventList *list)
 
17
void printRecord(const ::drizzle::EventList *list)
16
18
{
17
 
  using namespace drizzle;
18
 
  int32_t x;
 
19
  int32_t e_size;
19
20
 
20
 
  for (x= 0; x < list->event_size(); x++)
 
21
  for (e_size= 0; e_size < list->event_size(); e_size++)
21
22
  {
22
 
    const drizzle::Event event= list->event(x);
 
23
    const Event event= list->event(e_size);
23
24
 
24
 
    if (x != 0)
 
25
    if (e_size != 0)
25
26
      cout << endl << "##########################################################################################" << endl << endl;
26
27
 
27
28
    switch (event.type())
139
140
    return -1;
140
141
  }
141
142
 
142
 
  drizzle::EventList list;
 
143
  EventList list;
143
144
 
144
145
  if ((file= open(argv[1], O_RDONLY)) == -1)
145
146
  {