~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/binlog_reader.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <drizzled/global.h>
2
 
 
3
 
#include <drizzled/serialize/binary_log.h>
 
1
#include "binary_log.h"
4
2
 
5
3
#include <iostream>
6
 
#include <fstream>
7
4
 
8
5
#include <google/protobuf/io/coded_stream.h>
9
6
#include <google/protobuf/io/zero_copy_stream_impl.h>
32
29
 
33
30
 
34
31
void
35
 
print_event(BinaryLog::Event *)
 
32
print_event(BinaryLog::Event *event)
36
33
{
37
34
}
38
35
 
65
62
  if (optind > argc)
66
63
    print_usage_and_exit(argv[0]);
67
64
 
68
 
  filebuf fb;
69
 
 
70
 
  fb.open(file_name, std::ios::in);
71
 
  istream is(&fb);
72
 
 
73
 
  ZeroCopyInputStream* raw_input = new IstreamInputStream(&is);
 
65
  int fd = open(file_name, O_RDONLY);
 
66
  ZeroCopyInputStream* raw_input = new FileInputStream(fd);
74
67
  CodedInputStream *coded_input = new CodedInputStream(raw_input);
75
68
 
76
69
  BinaryLog::Event event;
79
72
 
80
73
  delete coded_input;
81
74
  delete raw_input;
82
 
  fb.close();
 
75
  close(fd);
83
76
}