summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog.test
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-05-07 18:31:02 +0400
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-05-07 18:31:02 +0400
commit025ca02f283cba3b108945b94a2b7504f16f93cc (patch)
tree216bb788f20f88666bd87a8d8bf98fbcfb8d7572 /mysql-test/t/mysqlbinlog.test
parent480fac610796e7ee6032c0db4c8ad8f38d3a912a (diff)
downloadmariadb-git-025ca02f283cba3b108945b94a2b7504f16f93cc.tar.gz
Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used
The --hexdump option crashed mysqlbinlog when used together with the --read-from-remote-server option due to use of uninitialized memory. Since Log_event::print_header() relies on temp_buf to be initialized when the --hexdump option is present, dump_remote_log_entries() was fixed to setup temp_buf to point to the start of a binlog event as done in dump_local_log_entries(). The root cause of this bug is identical to the one for bug #17654. The latter was fixed in 5.1 and up, so this patch is backport of the patches for bug #17654 to 5.0. Only 5.0 needs a changelog entry.
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r--mysql-test/t/mysqlbinlog.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 1ca07a40df1..dd45f499866 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -294,4 +294,14 @@ echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***;
eval SET @@global.server_id= $save_server_id;
--remove_file $binlog_file
+#
+# Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used
+#
+
+RESET MASTER;
+FLUSH LOGS;
+
+# We do not need the results, just make sure that mysqlbinlog does not crash
+--exec $MYSQL_BINLOG --hexdump --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 >/dev/null
+
--echo End of 5.0 tests