I am trying to manually decode the mysql binary log ROW format. Every update/insert/delete event is preceeded by an TABLE_MAP_EVENT.
This event contains a
Since I cannot see your actual implementation, this is just a blind guess, but take a look at the bug below, maybe that causes your headache: http://bugs.mysql.com/bug.php?id=67352
Table IDs used in replication were defined as type ulong on the master and uint on the slave. In addition, the maximum value for table IDs in binary log events is 6 bytes (281474976710655). This combination of factors led to the following issues: Data could be lost on the slave when a table was assigned an ID greater than uint. *Table IDs greater than 281474976710655 were written to the binary log as 281474976710655.* (...)