mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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/include/mysqlbinlog_row_engine.inc mysql-test/r/mysqlbinlog_row.result mysql-test/r/mysqlbinlog_row_big.result mysql-test/r/mysqlbinlog_row_innodb.result mysql-test/r/mysqlbinlog_row_myisam.result mysql-test/r/mysqlbinlog_row_trans.result mysql-test/t/mysqlbinlog_row.test mysql-test/t/mysqlbinlog_row_big.test mysql-test/t/mysqlbinlog_row_innodb.test mysql-test/t/mysqlbinlog_row_myisam.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/mysql_priv.h Adding new function prototype sql/rpl_tblmap.cc Adding pre-processor conditions sql/rpl_tblmap.h Adding pre-processor conditions sql/rpl_utility.h Adding pre-processor conditions sql/sql_base.cc Adding reset_table_id_sequence() function. sql/sql_repl.cc Resetting table_id on "RESET MASTER" .bzrignore Ignoring new symlinked files
This commit is contained in:
74
mysql-test/r/mysqlbinlog_row_big.result
Normal file
74
mysql-test/r/mysqlbinlog_row_big.result
Normal file
@ -0,0 +1,74 @@
|
||||
#
|
||||
# Preparatory cleanup.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
#
|
||||
# We need a fixed timestamp to avoid varying results.
|
||||
#
|
||||
SET timestamp=1000000000;
|
||||
#
|
||||
# We need big packets.
|
||||
#
|
||||
SET @@session.max_allowed_packet= 1024*1024*1024;
|
||||
#
|
||||
# Delete all existing binary logs.
|
||||
#
|
||||
RESET MASTER;
|
||||
#
|
||||
# Create a test table.
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 LONGTEXT
|
||||
) ENGINE=MyISAM DEFAULT CHARSET latin1;
|
||||
#
|
||||
# Show how much rows are affected by each statement.
|
||||
#
|
||||
#
|
||||
# Insert a big row.
|
||||
#
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
|
||||
affected rows: 1
|
||||
#
|
||||
# Show what we have in the table.
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 33554432
|
||||
affected rows: 1
|
||||
#
|
||||
# Grow the row by updating.
|
||||
#
|
||||
UPDATE t1 SET c1 = CONCAT(c1, c1);
|
||||
affected rows: 1
|
||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||
#
|
||||
# Show what we have in the table.
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 67108864
|
||||
affected rows: 1
|
||||
#
|
||||
# Delete the row.
|
||||
#
|
||||
DELETE FROM t1 WHERE c1 >= 'ManyMegaByteBlck';
|
||||
affected rows: 1
|
||||
#
|
||||
# Hide how much rows are affected by each statement.
|
||||
#
|
||||
#
|
||||
# Flush all log buffers to the log file.
|
||||
#
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Call mysqlbinlog to display the log file contents.
|
||||
# NOTE: The output of mysqlbinlog is redirected to
|
||||
# $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
|
||||
# If you want to examine it, disable remove_file
|
||||
# at the bottom of the test script.
|
||||
#
|
||||
#
|
||||
# Cleanup.
|
||||
#
|
||||
DROP TABLE t1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
|
Reference in New Issue
Block a user