From edd8ac6ef62297e2243193483022e271b2fe6365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Sat, 15 Jul 2017 12:28:46 +0200 Subject: [PATCH] Add missing newline to 'Row event for unknown table' message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is what currently happens: $ ./my sqlbinlog data/binlog.000004 --base64-output=decode-rows --verbose --start-position=832 --stop-position=880 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 832 #170713 17:09:31 server id 5718 end_log_pos 880 CRC32 0xa79de20f Write_rows: table id 257 flags: STMT_END_F ### Row event for unknown table #257SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/; DELIMITER ; # End of log file /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; This is how it should look: $ ./my sqlbinlog data/binlog.000004 --base64-output=decode-rows --verbose --start-position=832 --stop-position=880 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 832 #170713 17:09:31 server id 5718 end_log_pos 880 CRC32 0xa79de20f Write_rows: table id 257 flags: STMT_END_F ### Row event for unknown table #257 SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/; DELIMITER ; # End of log file /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; The "SET @@SESSION.GTID_NEXT…" message should be on a new line. --- sql/log_event.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 9789f7f3e06..c9f9f2b2a44 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2475,7 +2475,7 @@ void Rows_log_event::print_verbose(IO_CACHE *file, !(td= map->create_table_def())) { char llbuff[22]; - my_b_printf(file, "### Row event for unknown table #%s", + my_b_printf(file, "### Row event for unknown table #%s\n", llstr(m_table_id, llbuff)); return; }