mariadb/mysql-test/t/rpl_rbr_to_sbr.test
unknown 36815fa1ad Bug#16837 (Missing #ifdef cause compile problem --without-row-based-replication):
Added #ifdef's to make code work even when the system is built without
row-based replication.


mysql-test/r/create.result:
  Result change
mysql-test/r/innodb_mysql.result:
  Result change
mysql-test/t/create.test:
  Moving InnoDB specific test to innodb_mysql.test
mysql-test/t/innodb_mysql.test:
  Moving InnoDB-specific test from create.test
mysql-test/t/rpl_rbr_to_sbr.test:
  Test only sensible if we have row-based replication compiled in.
mysql-test/t/rpl_row_basic_8partition.test:
  Test only sensible if we have row-based replication compiled in.
sql/log.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/set_var.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/set_var.h:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/share/errmsg.txt:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_base.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_class.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_class.h:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_insert.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_parse.cc:
  Adding HAVE_ROW_BASED_REPLICATION guards on code to work without
  row-based replication.
sql/sql_table.cc:
  Not running hooks
2006-05-16 11:16:23 +02:00

48 lines
1.8 KiB
Text

-- source include/have_row_based.inc
-- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
# Test that the slave temporarily switches to ROW when seeing binrow
# events when it is in STATEMENT or MIXED mode
SET BINLOG_FORMAT=MIXED;
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
SET GLOBAL BINLOG_FORMAT=MIXED;
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
--echo **** On Master ****
CREATE TABLE t1 (a INT, b LONG);
INSERT INTO t1 VALUES (1,1), (2,2);
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
let $VERSION=`select version()`;
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
sync_slave_with_master;
--echo **** On Slave ****
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
connection master;
DROP TABLE IF EXISTS t1;
# Let's compare. Note: If they match test will pass, if they do not match
# the test will show that the diff statement failed and not reject file
# will be created. You will need to go to the mysql-test dir and diff
# the files your self to see what is not matching
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
# If all is good, we can remove the files
system rm $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql;
system rm $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;