| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that mysql server reports an error and aborts if the base name |
| 4 |
# used to binary and relay logs are the same. |
| 5 |
# |
| 6 |
# ==== Implementation ==== |
| 7 |
# |
| 8 |
# 1. Shutdown mysql server. |
| 9 |
# 2. Start mysql server with options that generate conflicts: |
| 10 |
# --log-bin=same_base_file_name --relay-log=same_base_file_name |
| 11 |
# 3. Verify that mysql server reports the errors |
| 12 |
# (ER_RPL_CANT_HAVE_SAME_BASENAME) and aborts |
| 13 |
# 4. Clean up. |
| 14 |
# |
| 15 |
# ==== References ==== |
| 16 |
# |
| 17 |
# WL10470: Defaults: Enable Binary Log |
| 18 |
|
| 19 |
--source include/not_group_replication_plugin.inc |
| 20 |
# Test in this file is binlog format agnostic, thus no need |
| 21 |
# to rerun it for every format. |
| 22 |
--source include/have_binlog_format_row.inc |
| 23 |
# Clean all configuration changes after running the test. |
| 24 |
--source include/force_restart.inc |
| 25 |
|
| 26 |
--let $error_log= $MYSQLTEST_VARDIR/tmp/rpl_filter_error_cases.err |
| 27 |
--source include/shutdown_mysqld.inc |
| 28 |
|
| 29 |
--echo # |
| 30 |
--echo # Verify that mysql server reports an error and aborts, if the same |
| 31 |
--echo # base name is specified for both --log-bin and --relay-log. |
| 32 |
--echo # |
| 33 |
--let $server_filter_params= --log-bin=same_base_file_name --relay-log=same_base_file_name |
| 34 |
let $mysqld=$MYSQLD_CMD --core-file --console > $error_log 2>&1 $server_filter_params; |
| 35 |
|
| 36 |
--error 1 |
| 37 |
--exec $mysqld |
| 38 |
--let $grep_file=$error_log |
| 39 |
--let $grep_pattern=Cannot have same base name '.*same_base_file_name' |
| 40 |
--let $grep_output= print_count |
| 41 |
--source include/grep_pattern.inc |
| 42 |
|
| 43 |
--echo # |
| 44 |
--echo # Verify that mysql server reports an error and aborts, if the relay log |
| 45 |
--echo # base name conflicts with binary log defaults. |
| 46 |
--echo # |
| 47 |
--let $server_filter_params= --relay-log=binlog |
| 48 |
let $mysqld=$MYSQLD_CMD --core-file --console > $error_log 2>&1 $server_filter_params; |
| 49 |
|
| 50 |
--error 1 |
| 51 |
--exec $mysqld |
| 52 |
--let $grep_file=$error_log |
| 53 |
--let $grep_pattern=Cannot have same base name '.*binlog' |
| 54 |
--let $grep_output= print_count |
| 55 |
--source include/grep_pattern.inc |
| 56 |
|
| 57 |
# Clean up. |
| 58 |
--source include/start_mysqld.inc |
| 59 |
--source include/wait_until_connected_again.inc |
| 60 |
--let $server_filter_params= |
| 61 |
--let $error_log= |
| 62 |
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_filter_error_cases.err |