4

Currently working on a binary log parser, that reads out the binary log written by a mysql database to write and convert changes into a MongoDB. This way I want to create "materialized views" transformed into Json to use that for further processing. In the binary log there is only a reference to a table with a "tableId".

I cannot find any reference to additional meta information about a table in http://dev.mysql.com/doc/refman/5.0/en/getting-information.html

So how to find out what table has which ID?

MatthiasLaug
  • 2,924
  • 6
  • 28
  • 43
  • even on http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog-row-events.html there is only a tableId mentioned, but no reference to a sort of mapping – MatthiasLaug Oct 08 '12 at 14:38
  • 1
    it seems like here is the solution, but still searching for the ability to query the information. http://dev.mysql.com/doc/refman/5.6/en/innodb-sys-tables-table.html – MatthiasLaug Oct 08 '12 at 16:36

1 Answers1

2

Finally I found a solution for that matter. Before each WriteRowsEvent in the binary log there occurs a TableMapEvent that helps you map whatever is happening next to a table name.

TableMapEvent[.... ,tableName=innodb_monitor, .... ]

After that event the actual change event happens and just describes the used table with the help of the index, the tableId ...

MatthiasLaug
  • 2,924
  • 6
  • 28
  • 43