On the way to
MySQL Proxy: replicating into memcache
I have another small side project:
- translating Row based log-records into Statement ones.
Our support team was asking for it since a while and it was a nice PoC that I can decode RBR events nicely.
Running MySQL 5.1 (with binlog_format = ROW) I issued:
mysql> INSERT INTO cols_pk VALUES \
( 3, "varchar", "char" ), ( 4, NULL, NULL );
... and have let mysql-binlog-dump decode the row-based log-events into SQL statements:
$ ./mysql-binlog-dump \ --binlog-file=/home/jan/datadir/mysql-bin.000010 -- mysql-binlog-dump.c:256: db = test BEGIN -- mysql-binlog-dump.c:220: CREATE TABLE test.cols_pk ( field_0 INT NOT NULL, field_1 VARCHAR(64) DEFAULT NULL, field_2 CHAR(64) DEFAULT NULL ) -- …[Read more]