Commit 2f6bb9cd authored by Anel Husakovic's avatar Anel Husakovic Committed by Andrew Hutchings

MDEV-30698 Cover missing test cases for mariadb-binlog options --raw [and] --flashback

- Adding test case for --raw without -R
- Adding unsuported combination of --raw and --flashback parameters and
covered with test case
parent 7300ab32
......@@ -3063,6 +3063,12 @@ int main(int argc, char** argv)
my_set_max_open_files(open_files_limit);
if (opt_flashback && opt_raw_mode)
{
error("The --raw mode is not allowed with --flashback mode");
die(1);
}
if (opt_flashback)
{
my_init_dynamic_array(&binlog_events, sizeof(LEX_STRING), 1024, 1024,
......
#
# MDEV-30698 Cover missing test cases for mariadb-binlog options
# --raw [and] --flashback
#
CREATE TABLE t1 (a int);
FLUSH LOGS;
INSERT INTO t1 VALUES (1);
......
......@@ -702,6 +702,10 @@ include/assert.inc [Table t1 should have 0 rows.]
# 6- Rows must be present upon restoring from flashback
include/assert.inc [Table t1 should have six rows.]
DROP TABLE t1;
#
# MDEV-30698 Cover missing test cases for mariadb-binlog options
# --raw [and] --flashback
#
SET binlog_format=statement;
Warnings:
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
......
......@@ -5,6 +5,7 @@
# respective log file specified by --result-file, and shown on-disk. This test
# ensures that the log files on disk, created by mariadb-binlog, have the most
# up-to-date events from the master.
# Option --raw works only with --read-from-remote-server, otherwise returns error.
#
# Methodology:
# On the master, rotate to a newly active binlog file and write an event to
......@@ -20,6 +21,14 @@
--source include/linux.inc
--source include/have_log_bin.inc
--echo #
--echo # MDEV-30698 Cover missing test cases for mariadb-binlog options
--echo # --raw [and] --flashback
--echo #
# Test --raw format without -R (--read-from-remote-server)
--error 1 # Error 1 operation not permitted
--exec $MYSQL_BINLOG --raw --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --stop-never --result-file=$MYSQLTEST_VARDIR/tmp/ master-bin.000001
# Create newly active log
CREATE TABLE t1 (a int);
FLUSH LOGS;
......
......@@ -364,6 +364,14 @@ FLUSH LOGS;
DROP TABLE t1;
--echo #
--echo # MDEV-30698 Cover missing test cases for mariadb-binlog options
--echo # --raw [and] --flashback
--echo #
--error 1 # --raw mode and --flashback mode are not allowed
--exec $MYSQL_BINLOG -vv -B --raw --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000003> $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_8.sql
## Clear
SET binlog_format=statement;
--error ER_FLASHBACK_NOT_SUPPORTED
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment