Bug #31455 mysqlbinlog don't print user readable info about RBR events
Submitted: 8 Oct 2007 15:37 Modified: 29 Aug 2008 17:24
Reporter: Lars Thalmann Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Alexander Barkov CPU Architecture:Any

[8 Oct 2007 15:37] Lars Thalmann
Description:
For SBR, mysqlbinlog output is quite easy to read for humans.
For RBR, only a BASE64 code of the event is printed.

How to repeat:
mysqlbinlog <name of binlog file>

Suggested fix:
Add printout (possibly controlled by option) of each record being 
inserted, updated or deleted by each RBR event.
[8 Oct 2007 16:12] Lars Thalmann
See also WL#4027
[31 Jul 2008 15:08] Lars Thalmann
The suggested solutions for this (as discussed with Jan and Mark) is:

1. Use field class to get correct interpretation of values

2. Print the data as commented (fake) SQL statements in the 
   same way as Jan is doing in his tool

3. For some row events, the field names would be needed.  E.g.
   to create UPDATE statements.  For these, we will add 
   SQL-like statements instead.  These can possibly be later
   processed by scripts to give correct SQL statements.
[15 Aug 2008 11:38] 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/51720

2675 Alexander Barkov	2008-08-15
      Bug#31455 mysqlbinlog don't print user readable info about RBR events 
      
      Implementing -v command line parameter to mysqlbinlog
      to decode and print row events.
      
        mysql-test/r/mysqlbinlog_row.result
        mysql-test/r/mysqlbinlog_row_trans.result
        mysql-test/t/mysqlbinlog_row.test
        mysql-test/t/mysqlbinlog_row_trans.test 
          Adding tests 
      
        client/Makefile.am
          Adding new files to symlink
        
        client/mysqlbinlog.cc
          Adding -v option
      
        sql/log_event.cc
          Impelentations of the new methods
      
        sql/log_event.h
          Declaration of the new methods and member
      
        sql/rpl_tblmap.cc
          Adding pre-processor conditions 
      
        sql/rpl_tblmap.h
          Adding pre-processor conditions 
      
        sql/rpl_utility.h
          Adding pre-processor conditions
[19 Aug 2008 9:37] 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/51926

2675 Alexander Barkov	2008-08-19
            Bug#31455 mysqlbinlog don't print user readable info about RBR events 
            
            Implementing -v command line parameter to mysqlbinlog
            to decode and print row events.
            
              mysql-test/r/mysqlbinlog_row.result
              mysql-test/r/mysqlbinlog_row_trans.result
              mysql-test/t/mysqlbinlog_row.test
              mysql-test/t/mysqlbinlog_row_trans.test 
                Adding tests 
            
              client/Makefile.am
                Adding new files to symlink
              
              client/mysqlbinlog.cc
                Adding -v option
            
              sql/log_event.cc
                Impelentations of the new methods
            
              sql/log_event.h
                Declaration of the new methods and member
            
              sql/rpl_tblmap.cc
                Adding pre-processor conditions 
            
              sql/rpl_tblmap.h
                Adding pre-processor conditions 
            
              sql/rpl_utility.h
                Adding pre-processor conditions 
      
              .bzrignore
                Ignoring new symlinked files
[19 Aug 2008 12:54] 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/51938

2675 Alexander Barkov	2008-08-19
       Bug#31455 mysqlbinlog don't print user readable info about RBR events 
      
      Implementing -v command line parameter to mysqlbinlog
      to decode and print row events.
      
      mysql-test/r/mysqlbinlog_row.result
      mysql-test/r/mysqlbinlog_row_trans.result
      mysql-test/t/mysqlbinlog_row.test
      mysql-test/t/mysqlbinlog_row_trans.test 
        Adding tests 
      
      client/Makefile.am
        Adding new files to symlink
        
      client/mysqlbinlog.cc
        Adding -v option
      
      sql/log_event.cc
        Impelentations of the new methods
      
      sql/log_event.h
        Declaration of the new methods and member
      
      sql/rpl_tblmap.cc
        Adding pre-processor conditions 
      
      sql/rpl_tblmap.h
        Adding pre-processor conditions 
      
      sql/rpl_utility.h
        Adding pre-processor conditions 
        
      .bzrignore
        Ignoring new symlinked files
[19 Aug 2008 15:48] 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/51981

2675 Alexander Barkov	2008-08-19
      Bug#31455 mysqlbinlog don't print user readable info about RBR events 
      
      Implementing -v command line parameter to mysqlbinlog
      to decode and print row events.
      
      mysql-test/r/mysqlbinlog_row.result
      mysql-test/r/mysqlbinlog_row_trans.result
      mysql-test/t/mysqlbinlog_row.test
      mysql-test/t/mysqlbinlog_row_trans.test 
        Adding tests 
      
      client/Makefile.am
        Adding new files to symlink
        
      client/mysqlbinlog.cc
        Adding -v option
      
      sql/log_event.cc
        Impelentations of the new methods
      
      sql/log_event.h
        Declaration of the new methods and member
      
      sql/rpl_tblmap.cc
        Adding pre-processor conditions 
      
      sql/rpl_tblmap.h
        Adding pre-processor conditions 
      
      sql/rpl_utility.h
        Adding pre-processor conditions 
        
      .bzrignore
        Ignoring new symlinked files
[21 Aug 2008 11:56] 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/52201

2681 Alexander Barkov	2008-08-21
      Additional fix for bug#31455 (rpl decoder)
      
      - Implementing --base64-format=decode-rows, to display
        SQL-alike decoded row events without their BINLOG statements.
      - Adding --base64-format=decode-rows into tests when
        calling mysqlbinlog to avoid non-deterministic results
      - Removing resetting of last_table_id in "RESET MASTER",
        which appeared to be dangerous.
[21 Aug 2008 11:57] 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/52202

2681 Alexander Barkov	2008-08-21
      Additional fix for bug#31455 (rpl decoder)
      
      - Implementing --base64-format=decode-rows, to display
        SQL-alike decoded row events without their BINLOG statements.
      - Adding --base64-format=decode-rows into tests when
        calling mysqlbinlog to avoid non-deterministic results
      - Removing resetting of last_table_id in "RESET MASTER",
        which appeared to be dangerous.
[22 Aug 2008 4:29] 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/52277

2682 Alexander Barkov	2008-08-22
      Additional fix for bug#31455
      
      Removing server version with regex_replace
      to avoid non-determenistic test results.
[22 Aug 2008 4:30] 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/52279

2682 Alexander Barkov	2008-08-22
      Additional fix for bug#31455
      
      Removing server version with regex_replace
      to avoid non-determenistic test results.
[22 Aug 2008 5:26] 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/52281

2683 Alexander Barkov	2008-08-22
      Additional fix for bug#31455.
      
      Exchanging "m_cols" and "m_cols_ai".
      
      Very confusing variable naming :(
[22 Aug 2008 5:26] 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/52282

2683 Alexander Barkov	2008-08-22
      Additional fix for bug#31455.
      
      Exchanging "m_cols" and "m_cols_ai".
      
      Very confusing variable naming :(
[22 Aug 2008 6:56] 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/52287

2775 Alexander Barkov	2008-08-22 [merge]
      Bug#31455
      - Merging from 5.1
      - Fixing is_null handling in Rows_log_event::print_verbose_one_row().
[22 Aug 2008 7:12] 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/52289

2775 Alexander Barkov	2008-08-22 [merge]
      Bug#31455
      - Merging from 5.1
      - Fixing is_null handling in Rows_log_event::print_verbose_one_row().
[22 Aug 2008 10:21] 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/52296

2684 Alexander Barkov	2008-08-22
      Additional fix for bug#31455
      Getting rid of non-deterministic results of sprintf("%-20g").
      Displaying only 3 digits after decimal dot.
[22 Aug 2008 10:22] 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/52297

2684 Alexander Barkov	2008-08-22
      Additional fix for bug#31455
      Getting rid of non-deterministic results of sprintf("%-20g").
      Displaying only 3 digits after decimal dot.
[25 Aug 2008 8:06] 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/52416

2686 Alexander Barkov	2008-08-25
      Additional ffix for bug#31455
      - fixing double problem on big endian machines
      - modifying regex_replace to replace negative numbers
        Previously only positive numbers where replaced.
[25 Aug 2008 8: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/52417

2686 Alexander Barkov	2008-08-25
      Additional ffix for bug#31455
      - fixing double problem on big endian machines
      - modifying regex_replace to replace negative numbers
        Previously only positive numbers where replaced.
[25 Aug 2008 10:37] 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/52431

2687 Alexander Barkov	2008-08-25
      Additional fix for bug#31455
      Fixing non-deterministic test results:
      the number of spaces in FLOAT/DOUBLE output could 
      vary between different platforms.
[25 Aug 2008 10:38] 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/52432

2687 Alexander Barkov	2008-08-25
      Additional fix for bug#31455
      Fixing non-deterministic test results:
      the number of spaces in FLOAT/DOUBLE output could 
      vary between different platforms.
[26 Aug 2008 7:02] Bugs System
Pushed into 6.0.7-alpha  (revid:bar@mysql.com-20080825102959-93e8j30j2iz51irf) (version source revid:bar@mysql.com-20080826065200-rimrvolak0f3d69y) (pib:3)
[26 Aug 2008 7:12] Bugs System
Pushed into 5.1.28  (revid:bar@mysql.com-20080825102959-93e8j30j2iz51irf) (version source revid:bar@mysql.com-20080826065530-dkv502fg0zey1nyj) (pib:3)
[26 Aug 2008 9:54] Alexander Barkov
Pushed into 6.0.7-alpha and 5.1.28.
[29 Aug 2008 17:24] Paul DuBois
Noted in 5.1.28, 6.0.7 changelog.

mysqlbinlog now supports --verbose and --base64-output=DECODE-ROWS
options to display row events as commented SQL statements. (The
default otherwise is to display row events encoded as base-64 strings
using BINLOG statements.)

See: http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog-row-events.html
[13 Sep 2008 20:54] Bugs System
Pushed into 6.0.7-alpha  (revid:bar@mysql.com-20080822064855-juqm7gq3c1kbtcpt) (version source revid:hakan@mysql.com-20080725175322-8wgujj5xuzrjz3ke) (pib:3)
[30 Sep 2008 13:26] 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/54774

2667 He Zhenxing	2008-09-29 [merge]
      Auto Merge