summaryrefslogtreecommitdiff
path: root/mysql-test/main/mysqlbinlog.test
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-05-12 11:46:58 -0600
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-05-13 11:07:21 -0600
commitd4ba8ce6bce4a81197be85497cfafe5952ad45de (patch)
tree7edd3495ba0eda6ccef99522c18919cda5a18ef9 /mysql-test/main/mysqlbinlog.test
parent4d53a7585c532c2cfcea184259e3153f95b35683 (diff)
downloadmariadb-git-10.5-MDEV-25222.tar.gz
MDEV-25222: mysqlbinlog --base64-output wrong option default drops BINLOG from output10.5-MDEV-25222
Problem: ======= The ALWAYS option of the mariadb-binlog --base64-output formats its output incorrectly. This option is deprecated, and MySQL 8.0 has removed it entirely. Solution: ======== Adhere to MySQL and remove this option from MariaDB. Behavioral Changes: ================== Use Case: ./mariadb-binlog --base64-output Previous Behavior: Sets base64-output mode to always New Behavior: Error message indicating incomplete argument Use Case: ./mariadb-binlog --base64-output=always Previous Behavior: Sets base64-output mode to always New Behavior: Error message indicating invalid argument value
Diffstat (limited to 'mysql-test/main/mysqlbinlog.test')
-rw-r--r--mysql-test/main/mysqlbinlog.test32
1 files changed, 23 insertions, 9 deletions
diff --git a/mysql-test/main/mysqlbinlog.test b/mysql-test/main/mysqlbinlog.test
index 79b745e1645..004df084e71 100644
--- a/mysql-test/main/mysqlbinlog.test
+++ b/mysql-test/main/mysqlbinlog.test
@@ -521,18 +521,32 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn;
#
-# WL#5625: Deprecate mysqlbinlog options --base64-output=always and --base64-output
+# MDEV-25222: Remove mysqlbinlog options --base64-output=always and --base64-output
#
---echo # Expect deprecation warning.
---exec $MYSQL_BINLOG --base64-output=always std_data/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
---cat_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
+--echo #
+--echo # Expect error for invalid --base64-output argument value.
+--echo # MYSQL_BINLOG std_data/master-bin.000001 --base64-output=always 2>&1
+--error 1
+--exec $MYSQL_BINLOG std_data/master-bin.000001 --base64-output=always 2>&1
+
+--echo #
+--echo # Expect error for incomplete --base64-output argument.
+--echo # MYSQL_BINLOG std_data/master-bin.000001 --base64-output 2>&1
+# The error produces the absolute path of the mysqlbinlog executable, remove it
+--replace_regex /.*mysqlbinlog.*:/mysqlbinlog:/i
+--error 1
+--exec $MYSQL_BINLOG std_data/master-bin.000001 --base64-output 2>&1
---echo # Expect deprecation warning again.
---exec $MYSQL_BINLOG --base64-output std_data/master-bin.000001 > /dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
---cat_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
+--echo #
+--echo # Ensure --base64-output=auto outputs the same result as unspecified
+--echo # MYSQL_BINLOG -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--exec $MYSQL_BINLOG -v $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--echo # MYSQL_BINLOG --base64-output=auto -v MYSQLD_DATADIR/master-bin.000001 > MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--exec $MYSQL_BINLOG --base64-output=auto -v $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_nob64spec.out
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_b64auto.out
-# Clean up this part of the test.
---remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn
# BUG#50914
# This test verifies if the approach of the mysqlbinlog prints