mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	A query SET @@GLOBAL.binlog_format = ... returns an error when NDB is the default storage. This fails some tests invoking the set binlog_format explicitly. because the var turns to be read-only. In the following are files and method to fix if needed. t/ ndb_binlog_basic2.test # here the failure is benign rpl_rbr_to_sbr.test # does not check any ndb features => . # => not_ndb_default is enough rpl_row_basic_8partition.test # set binlog_format can be replaced rpl_switch_stm_row_mixed.test # does not check any ndb features => . # => not_ndb_default is enough two more invoking invoke extra/rpl_truncate_helper.test rpl_truncate_2myisam # to be fixed with not_ndb_default rpl_truncate_3innodb # same as above . # because there is a dedicated to ndb . . # rpl_truncate_7ndb* suit. Adapting/testing a new implement --source include/safe_set_to_maybe_ro_var.inc to avoid abort due to the error using binlog_format as application. BitKeeper/etc/ignore: Added mysql-test/t/rpl_truncate_4ndb.test to the ignore list mysql-test/r/rpl_row_basic_8partition.result: new results mysql-test/t/rpl_rbr_to_sbr.test: # does not check any ndb features => not_ndb_default is enough mysql-test/t/rpl_row_basic_8partition.test: set binlog_format can be read-only because of e.g default storage ndb. adapting/testing a new implement --source include/safe_set_to_maybe_ro_var.inc to avoid abort due to the error. Note, that it this particular test we could simply remove SET binlog_format because there is have_binlog_format_row require, as the test is about RBR. Futhermore utilizing safe_set_to_maybe_ro_var is redundat as well as long as we keep non_ndb_default guard. The latter is introduced because of ndb partitioning per-key limitation #19259: rpl_ndb_dd_partitions fails on solaris. The page is updated to refer to this test's. mysql-test/t/rpl_switch_stm_row_mixed.test: excluding ndb option, no ndb features mysql-test/t/rpl_truncate_2myisam.test: ndb checks truncate separately mysql-test/t/rpl_truncate_3innodb.test: ndb checks truncate separately mysql-test/include/safe_set_to_maybe_ro_var.inc: pseudo-macro to make read-only global/session vars "settable" in sense that SET var= val won't produce any error nor aborts testing.
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- source include/have_row_based.inc
 | |
| -- source include/have_binlog_format_mixed_or_statement.inc
 | |
| -- source include/not_ndb_default.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;
 | |
| 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;
 |