Gather ID of mysql table

2k views Asked by At

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?

1

There are 1 answers

0
MatthiasLaug On BEST ANSWER

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 ...