Bug #47557 | mysqlbinlog -v should output 'limit 1' for update and delete row events | ||
---|---|---|---|
Submitted: | 23 Sep 2009 15:50 | Modified: | 27 Jan 2011 20:00 |
Reporter: | Sven Sandberg | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Row Based Replication ( RBR ) | Severity: | S2 (Serious) |
Version: | 5.1+ | OS: | Any |
Assigned to: | Luis Soares | CPU Architecture: | Any |
Tags: | mysqlbinlog, RBL |
[23 Sep 2009 15:50]
Sven Sandberg
[18 Jan 2011 0:15]
Luis Soares
This is not a bug and there is no need to append 'LIMIT 1' to mysqlbinlog -v output. The purpose of the -v option is to display *comments* explaining what the row events do: it was never meant to output the correct SQL statements out of the rows events. The display format chosen for structuring such comments was a pseudo-SQL notation, in which SQL-like statements are reconstructed out of the rows events. This is explained in the manual: "To see the row events as comments in the form of “pseudo-SQL” statements, run mysqlbinlog with the --verbose or -v option. The output will contain lines beginning with ###:" See: http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog-row-events.html
[18 Jan 2011 11:20]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/129067 3522 Luis Soares 2011-01-18 BUG#47557: mysqlbinlog -v should output 'limit 1' for update and delete row events mysqlbinlog -v shows pseudo-SQL statements, reconstructed out of the rows, as comments. However, --verbose description mentions that it reconstructs SQL statements, when in fact these are SQL-like statements and not, 100% valid, SQL instructions. We fix this by replacing "SQL" with "pseudo-SQL" in mysqlbinlog help text (pseudo-SQL is actually the term used in the user manual).
[18 Jan 2011 12:10]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/129076 3522 Luis Soares 2011-01-18 BUG#47557: mysqlbinlog -v should output 'limit 1' for update and delete row events mysqlbinlog -v shows pseudo-SQL statements, reconstructed out of the rows, as comments. However, --verbose description mentions that it reconstructs SQL statements, when in fact these are SQL-like statements and not, 100% valid, SQL instructions. We fix this by replacing "SQL" with "pseudo-SQL" in mysqlbinlog help text (pseudo-SQL is actually the term used in the user manual).
[18 Jan 2011 12:37]
Luis Soares
Queued in mysql-trunk.
[18 Jan 2011 12:37]
Bugs System
Pushed into mysql-trunk 5.6.2 (revid:luis.soares@oracle.com-20110118123551-wv9zw6gtdxqyv51w) (version source revid:luis.soares@oracle.com-20110118123551-wv9zw6gtdxqyv51w) (merge vers: 5.6.2) (pib:24)
[27 Jan 2011 20:00]
Jon Stephens
Documented in the 5.6.2 changelog as follows: The --help text for mysqlbinlog now indicates that the --verbose (-v) option outputs pseudo-SQL that is not necessarily valid SQL and cannot be guaranteed to work verbatim in MySQL clients. Closed.