~mysqlatfacebook/mysqlatfacebook/tools

14.1.3 by Domas Mituzas
Faker: C implementation of InnoDB fake changes based replication prefetcher
1
#include "faker.h"
2
3
int main(int argc, char **argv)
4
{
5
6
    if (argc < 2) {
7
        g_critical("Need binlog file name");
8
        exit(EXIT_FAILURE);
9
    }
10
11
    BINLOG *binlog = open_binlog(argv[1]);
12
    EVENT *event;
13
14
    if (!binlog)
15
        exit(EXIT_FAILURE);
16
17
    while ((event = read_binlog(binlog))) {
18
        printf("%*s\n", event->query_length, (char *) event->query);
19
    }
20
}