Bug #66745 Error in example payload for TABLE_MAP_EVENT
Submitted: 9 Sep 2012 20:39 Modified: 5 Oct 2012 11:09
Reporter: Julien Duponchelle Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[9 Sep 2012 20:39] Julien Duponchelle
Description:
Hi,

In Payload example for TABLE_MAP_EVENT the column_count field is missing.

http://dev.mysql.com/doc/internals/en/table-map-event.html

Thanks

How to repeat:
Go to http://dev.mysql.com/doc/internals/en/table-map-event.html

Suggested fix:
Payload should be:
post-header:
  6              table id
  2              flags

payload:
  1              schema name length
  string         schema name
  1              table name length
  string         table name
  lenenc-int  column_count 
  lenenc-str     column-def
  lenenc-str     column-meta-def
  n              NULL-bitmask, length: (column-length * 8) / 7
[11 Sep 2012 19:23] Sveta Smirnova
Thank you for the report.

Verified as described.
[2 Oct 2012 16:41] Paul DuBois
Correct URL is http://dev.mysql.com/doc/internals/en/row-based-replication.html#table-map-event
[5 Oct 2012 11:09] Jan Kneschke
In the updated version of the docs the line

  lenenc-str     column-def

is unwrapped into

  lenenc-int      column-count
  string.var_len  column-types [length=column-count]

to make it explicit as the count is used in several places.