List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:February 4 2008 4:43pm
Subject:Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional test
View as plain text  
He Zhenxing wrote:
> Hi Magnus
> 
> I have made some changes some primitives due to versional test, 
> Could you please review this? Thanks!
> 
> Best regards!


Yes, see my comments marked with magnus: below.


> diff -Nrup a/mysql-test/extra/rpl_tests/rpl_truncate.test
> b/mysql-test/extra/rpl_tests/rpl_truncate.test
> --- a/mysql-test/extra/rpl_tests/rpl_truncate.test	2006-12-07 22:18:27 +08:00
> +++ b/mysql-test/extra/rpl_tests/rpl_truncate.test	2008-01-17 16:23:50 +08:00
> @@ -7,6 +7,7 @@
>  #
>  # Author(s): Mats Kindahl
>  
> +--source include/have_dynamic_binlog_format.inc
>  --source include/master-slave.inc
>  
>  let $format = STATEMENT;


> diff -Nrup a/mysql-test/include/have_dynamic_binlog_format.inc
> b/mysql-test/include/have_dynamic_binlog_format.inc
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/mysql-test/include/have_dynamic_binlog_format.inc	2008-01-17 16:23:50 +08:00
> @@ -0,0 +1,23 @@
> +# test if server can switch binlog_format dynamically
> +
> +--disable_abort_on_error
> +--disable_query_log
> +--disable_result_log
> +let $saved_binlog_format=query_get_value(show variables like 'binlog_format', Value,
> 1);
> +set @@binlog_format= 'statement';
> +
> +--enable_result_log
> +--require r/have_dynamic_binlog_format.require
> +--replace_result STATEMENT OK

magnus: ^It should be possible to write all of this without using a 
.require file. That will save us one more file to keep track of and 
would also make the code above easier to read.

Instead send the query for evaluation to the SQL server like this.

if (`SELECT STRCMP(@@binlog_format, 'STATEMENT') = 0`){
   skip Does not support dynamic binlog switch;
}

The SQL I wrote above is untested, you have to tune it to return 0 or 1 
but I hope you get the idea. It's also possible to use the builtin 
variable $mysql_errno.

--error 0,12345
           ^ Enter here the errorcode you would get from a server
             that does not support dynamic siwtch.
set @@binlog_format= 'statement';
if ($mysql_errno){
  skip Does not support ....;
}

or the third way:

disable_abort_on_error;
set @@binlog_format= 'statement';
if ($mysql_errno){
  skip Does not support ....;
}
enable_abort_on _error;





> diff -Nrup a/mysql-test/include/have_engine.inc b/mysql-test/include/have_engine.inc
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/mysql-test/include/have_engine.inc	2008-01-17 16:23:50 +08:00
> @@ -0,0 +1,20 @@
> +#
> +# have_engine.inc -- test if specified storage engine supported
> +#
> +# set variable $_engine_type before source this file
> +# for example:
> +#   --let $_engine_type=InnoDB
> +#   --source include/have_engine.inc
> +
> +disable_query_log;
> +--source include/supported_engines.inc
> +
> +--exec rm -f $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +--exec echo "exec rm -f \$MYSQLTEST_VARDIR/tmp/have_engine.inc;" >>
> $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +--exec echo "if (!\$have_$_engine_type)" >>
> $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +--exec echo "{" >> $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +--exec echo "skip requires '$_engine_type' storage engine;" >>
> $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +--exec echo "}" >> $MYSQLTEST_VARDIR/tmp/have_engine.inc
> +
> +--source var/tmp/have_engine.inc
> +enable_query_log;

magnus: Could you describe to me what you want to do here and why it 
must be done by dynamically writing an include file. I wouldn't 
recommend that! Even if it's kind of cool. ;)

Please find another way.

magnus: Note2, don't use "--exec rm" and similar commands, they are not 
portable to Windows.


> diff -Nrup a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc
> --- a/mysql-test/include/have_innodb.inc	2007-12-21 04:57:00 +08:00
> +++ b/mysql-test/include/have_innodb.inc	2008-01-17 16:23:50 +08:00
> @@ -1,4 +1,4 @@
>  disable_query_log;
> ---require r/true.require
> -select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE`
> from information_schema.engines where engine = 'innodb';
> +--let $_engine_type=InnoDB
> +--source include/have_engine.inc
>  enable_query_log;
> diff -Nrup a/mysql-test/include/have_partition.inc
> b/mysql-test/include/have_partition.inc
> --- a/mysql-test/include/have_partition.inc	2006-01-23 22:42:26 +08:00
> +++ b/mysql-test/include/have_partition.inc	2008-01-17 16:23:50 +08:00
> @@ -1,4 +1,5 @@
>  -- require r/have_partition.require
>  disable_query_log;
> -show variables like "have_partitioning";
> +--replace_result have_partition_engine have_partitioning
> +show variables like "have_partition%";
>  enable_query_log;
> diff -Nrup a/mysql-test/include/show_binlog_events.inc
> b/mysql-test/include/show_binlog_events.inc
> --- a/mysql-test/include/show_binlog_events.inc	2007-04-19 05:08:53 +08:00
> +++ b/mysql-test/include/show_binlog_events.inc	2008-01-17 16:23:50 +08:00
> @@ -1,4 +1,7 @@
> ---let $binlog_start=106
> +--let $VERSION=`select version()`
> +--let $binlog_start=query_get_value(show binlog events limit 1, End_log_pos, 1)
> +
> +--replace_result $VERSION VERSION
>  --replace_result $binlog_start <binlog_start>
>  --replace_column 2 # 4 # 5 #
>  --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
> diff -Nrup a/mysql-test/include/show_binlog_events2.inc
> b/mysql-test/include/show_binlog_events2.inc
> --- a/mysql-test/include/show_binlog_events2.inc	2007-04-19 05:08:53 +08:00
> +++ b/mysql-test/include/show_binlog_events2.inc	2008-01-17 16:23:50 +08:00
> @@ -2,7 +2,10 @@
>  # Differs slightly from show_binlog events in showing server_id
>  # which is important for some tests
>  #
> ---let $binlog_start=106
> +--let $VERSION=`select version()`
> +--let $binlog_start=query_get_value(show binlog events limit 1, End_log_pos, 1)
> +
> +--replace_result $VERSION VERSION
s>  --replace_result $binlog_start <binlog_start>
>  --replace_column 2 # 5 #
>  --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
> diff -Nrup a/mysql-test/include/supported_engines.inc
> b/mysql-test/include/supported_engines.inc
> --- /dev/null	Wed Dec 31 16:00:00 196900
> +++ b/mysql-test/include/supported_engines.inc	2008-01-17 16:23:50 +08:00
> @@ -0,0 +1,5 @@
> +disable_query_log;
> +--exec $MYSQL -e 'show engines' | sed -ne "s/^\([^
> 	]\+\)\s\+\(YES\|DEFAULT\).*/--let \$have_\1=1/p" >
> $MYSQLTEST_VARDIR/tmp/supported_engines.inc


magnus: sed is not portable. Can you descibe what you need and I'll try 
to help with a way to extract it.

As it is now, I don't really see what the let $have_<engine> variables 
are used for.



> +--source $MYSQLTEST_VARDIR/tmp/supported_engines.inc
> +--exec rm -f $MYSQLTEST_VARDIR/tmp/supported_engines.inc
magnus:   ^  Not portable, use --remove_file <file_name>


> +enable_query_log;
> diff -Nrup a/mysql-test/suite/rpl/r/rpl_binlog_grant.result
> b/mysql-test/suite/rpl/r/rpl_binlog_grant.result
> --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result	2007-11-23 19:51:10 +08:00
> +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result	2008-01-17 16:23:50 +08:00
> @@ -17,16 +17,15 @@ show grants for x@y;
>  Grants for x@y
>  GRANT USAGE ON *.* TO 'x'@'y'
>  GRANT SELECT ON `d1`.`t` TO 'x'@'y'
> -show binlog events;
> +show binlog events from <binlog_start>;
>  Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	4	Format_desc	1	106	Server ver: VERSION, Binlog ver: 4
> -master-bin.000001	106	Query	1	193	drop database if exists d1
> -master-bin.000001	193	Query	1	272	create database d1
> -master-bin.000001	272	Query	1	370	use `d1`; create table t (s1 int) engine=innodb
> -master-bin.000001	370	Query	1	436	use `d1`; BEGIN
> -master-bin.000001	436	Query	1	521	use `d1`; insert into t values (1)
> -master-bin.000001	521	Xid	1	548	COMMIT /* XID */
> -master-bin.000001	548	Query	1	633	use `d1`; grant select on t to x@y
> +master-bin.000001	#	Query	#	#	drop database if exists d1
> +master-bin.000001	#	Query	#	#	create database d1
> +master-bin.000001	#	Query	#	#	use `d1`; create table t (s1 int) engine=innodb
> +master-bin.000001	#	Query	#	#	use `d1`; BEGIN
> +master-bin.000001	#	Query	#	#	use `d1`; insert into t values (1)
> +master-bin.000001	#	Xid	#	#	COMMIT /* XID */
> +master-bin.000001	#	Query	#	#	use `d1`; grant select on t to x@y
>  start transaction;
>  insert into t values (2);
>  revoke select on t from x@y;
> @@ -38,19 +37,18 @@ s1
>  show grants for x@y;
>  Grants for x@y
>  GRANT USAGE ON *.* TO 'x'@'y'
> -show binlog events;
> +show binlog events from <binlog_start>;
>  Log_name	Pos	Event_type	Server_id	End_log_pos	Info
> -master-bin.000001	4	Format_desc	1	106	Server ver: VERSION, Binlog ver: 4
> -master-bin.000001	106	Query	1	193	drop database if exists d1
> -master-bin.000001	193	Query	1	272	create database d1
> -master-bin.000001	272	Query	1	370	use `d1`; create table t (s1 int) engine=innodb
> -master-bin.000001	370	Query	1	436	use `d1`; BEGIN
> -master-bin.000001	436	Query	1	521	use `d1`; insert into t values (1)
> -master-bin.000001	521	Xid	1	548	COMMIT /* XID */
> -master-bin.000001	548	Query	1	633	use `d1`; grant select on t to x@y
> -master-bin.000001	633	Query	1	699	use `d1`; BEGIN
> -master-bin.000001	699	Query	1	784	use `d1`; insert into t values (2)
> -master-bin.000001	784	Xid	1	811	COMMIT /* XID */
> -master-bin.000001	811	Query	1	899	use `d1`; revoke select on t from x@y
> +master-bin.000001	#	Query	#	#	drop database if exists d1
> +master-bin.000001	#	Query	#	#	create database d1
> +master-bin.000001	#	Query	#	#	use `d1`; create table t (s1 int) engine=innodb
> +master-bin.000001	#	Query	#	#	use `d1`; BEGIN
> +master-bin.000001	#	Query	#	#	use `d1`; insert into t values (1)
> +master-bin.000001	#	Xid	#	#	COMMIT /* XID */
> +master-bin.000001	#	Query	#	#	use `d1`; grant select on t to x@y
> +master-bin.000001	#	Query	#	#	use `d1`; BEGIN
> +master-bin.000001	#	Query	#	#	use `d1`; insert into t values (2)
> +master-bin.000001	#	Xid	#	#	COMMIT /* XID */
> +master-bin.000001	#	Query	#	#	use `d1`; revoke select on t from x@y
>  drop user x@y;
>  drop database d1;
> diff -Nrup a/mysql-test/suite/rpl/r/rpl_loaddata.result
> b/mysql-test/suite/rpl/r/rpl_loaddata.result
> --- a/mysql-test/suite/rpl/r/rpl_loaddata.result	2007-06-27 20:28:28 +08:00
> +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result	2008-01-17 16:23:50 +08:00
> @@ -37,9 +37,45 @@ insert into t1 values(1,10);
>  load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
>  set global sql_slave_skip_counter=1;
>  start slave;
> -show slave status;
>
> -Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
>
> -#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1797	#	#	master-bin.000001	Yes	Yes				#			0		0	1797	#	None		0	No						#	No	0		0	
> +SHOW SLAVE STATUS;
> +Slave_IO_State	#
> +Master_Host	127.0.0.1
> +Master_User	root
> +Master_Port	MASTER_PORT
> +Connect_Retry	1
> +Master_Log_File	master-bin.000001
> +Read_Master_Log_Pos	#
> +Relay_Log_File	#
> +Relay_Log_Pos	#
> +Relay_Master_Log_File	master-bin.000001
> +Slave_IO_Running	Yes
> +Slave_SQL_Running	Yes
> +Replicate_Do_DB	
> +Replicate_Ignore_DB	
> +Replicate_Do_Table	
> +Replicate_Ignore_Table	#
> +Replicate_Wild_Do_Table	
> +Replicate_Wild_Ignore_Table	
> +Last_Errno	0
> +Last_Error	
> +Skip_Counter	0
> +Exec_Master_Log_Pos	#
> +Relay_Log_Space	#
> +Until_Condition	None
> +Until_Log_File	
> +Until_Log_Pos	0
> +Master_SSL_Allowed	No
> +Master_SSL_CA_File	
> +Master_SSL_CA_Path	
> +Master_SSL_Cert	
> +Master_SSL_Cipher	
> +Master_SSL_Key	
> +Seconds_Behind_Master	#
> +Master_SSL_Verify_Server_Cert	No
> +Last_IO_Errno	#
> +Last_IO_Error	#
> +Last_SQL_Errno	0
> +Last_SQL_Error	
>  set sql_log_bin=0;
>  delete from t1;
>  set sql_log_bin=1;
> @@ -47,9 +83,45 @@ load data infile '../std_data_ln/rpl_loa
>  stop slave;
>  change master to master_user='test';
>  change master to master_user='root';
> -show slave status;
>
> -Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
>
> -#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1832	#	#	master-bin.000001	No	No				#			0		0	1832	#	None		0	No						#	No	0		0	
> +SHOW SLAVE STATUS;
> +Slave_IO_State	#
> +Master_Host	127.0.0.1
> +Master_User	root
> +Master_Port	MASTER_PORT
> +Connect_Retry	1
> +Master_Log_File	master-bin.000001
> +Read_Master_Log_Pos	#
> +Relay_Log_File	#
> +Relay_Log_Pos	#
> +Relay_Master_Log_File	master-bin.000001
> +Slave_IO_Running	No
> +Slave_SQL_Running	No
> +Replicate_Do_DB	
> +Replicate_Ignore_DB	
> +Replicate_Do_Table	
> +Replicate_Ignore_Table	#
> +Replicate_Wild_Do_Table	
> +Replicate_Wild_Ignore_Table	
> +Last_Errno	0
> +Last_Error	
> +Skip_Counter	0
> +Exec_Master_Log_Pos	#
> +Relay_Log_Space	#
> +Until_Condition	None
> +Until_Log_File	
> +Until_Log_Pos	0
> +Master_SSL_Allowed	No
> +Master_SSL_CA_File	
> +Master_SSL_CA_Path	
> +Master_SSL_Cert	
> +Master_SSL_Cipher	
> +Master_SSL_Key	
> +Seconds_Behind_Master	#
> +Master_SSL_Verify_Server_Cert	No
> +Last_IO_Errno	#
> +Last_IO_Error	#
> +Last_SQL_Errno	0
> +Last_SQL_Error	
>  set global sql_slave_skip_counter=1;
>  start slave;
>  set sql_log_bin=0;
> @@ -58,9 +130,45 @@ set sql_log_bin=1;
>  load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
>  stop slave;
>  reset slave;
> -show slave status;
>
> -Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert	Last_IO_Errno	Last_IO_Error	Last_SQL_Errno	Last_SQL_Error
>
> -#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	No	0		0	
> +SHOW SLAVE STATUS;
> +Slave_IO_State	#
> +Master_Host	127.0.0.1
> +Master_User	root
> +Master_Port	MASTER_PORT
> +Connect_Retry	1
> +Master_Log_File	
> +Read_Master_Log_Pos	#
> +Relay_Log_File	#
> +Relay_Log_Pos	#
> +Relay_Master_Log_File	
> +Slave_IO_Running	No
> +Slave_SQL_Running	No
> +Replicate_Do_DB	
> +Replicate_Ignore_DB	
> +Replicate_Do_Table	
> +Replicate_Ignore_Table	#
> +Replicate_Wild_Do_Table	
> +Replicate_Wild_Ignore_Table	
> +Last_Errno	0
> +Last_Error	
> +Skip_Counter	0
> +Exec_Master_Log_Pos	#
> +Relay_Log_Space	#
> +Until_Condition	None
> +Until_Log_File	
> +Until_Log_Pos	0
> +Master_SSL_Allowed	No
> +Master_SSL_CA_File	
> +Master_SSL_CA_Path	
> +Master_SSL_Cert	
> +Master_SSL_Cipher	
> +Master_SSL_Key	
> +Seconds_Behind_Master	#
> +Master_SSL_Verify_Server_Cert	No
> +Last_IO_Errno	#
> +Last_IO_Error	#
> +Last_SQL_Errno	0
> +Last_SQL_Error	
>  reset master;
>  create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
>  unique(day)) engine=MyISAM;
> diff -Nrup a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
> b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
> --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2007-08-21 20:32:26 +08:00
> +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result	2008-01-17 16:23:50 +08:00
> @@ -4,11 +4,12 @@ reset master;
>  reset slave;
>  drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
>  start slave;
> -SET BINLOG_FORMAT=MIXED;
> -SET GLOBAL BINLOG_FORMAT=MIXED;
> -SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
> -@@GLOBAL.BINLOG_FORMAT	@@SESSION.BINLOG_FORMAT
> -MIXED	MIXED
> +SHOW SESSION VARIABLES LIKE 'BINLOG_FORMAT';
> +Variable_name	Value
> +binlog_format	MIXED
> +SHOW GLOBAL VARIABLES LIKE 'BINLOG_FORMAT';
> +Variable_name	Value
> +binlog_format	MIXED
>  **** On Master ****
>  CREATE TABLE t1 (a INT, b LONG);
>  INSERT INTO t1 VALUES (1,1), (2,2);
> @@ -28,7 +29,7 @@ Master_User	root
>  Master_Port	MASTER_PORT
>  Connect_Retry	1
>  Master_Log_File	master-bin.000001
> -Read_Master_Log_Pos	457
> +Read_Master_Log_Pos	#
>  Relay_Log_File	#
>  Relay_Log_Pos	#
>  Relay_Master_Log_File	master-bin.000001
> @@ -37,13 +38,13 @@ Slave_SQL_Running	Yes
>  Replicate_Do_DB	
>  Replicate_Ignore_DB	
>  Replicate_Do_Table	
> -Replicate_Ignore_Table	
> +Replicate_Ignore_Table	#
>  Replicate_Wild_Do_Table	
>  Replicate_Wild_Ignore_Table	
>  Last_Errno	0
>  Last_Error	
>  Skip_Counter	0
> -Exec_Master_Log_Pos	457
> +Exec_Master_Log_Pos	#
>  Relay_Log_Space	#
>  Until_Condition	None
>  Until_Log_File	
> @@ -55,9 +56,9 @@ Master_SSL_Cert	
>  Master_SSL_Cipher	
>  Master_SSL_Key	
>  Seconds_Behind_Master	#
> -Master_SSL_Verify_Server_Cert	#
> +Master_SSL_Verify_Server_Cert	No
>  Last_IO_Errno	#
> -Last_IO_Error	
> +Last_IO_Error	#
>  Last_SQL_Errno	0
>  Last_SQL_Error	
>  SHOW BINLOG EVENTS;
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
> b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
> --- a/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test	2007-10-10 22:42:52
> +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test	2008-01-17 16:23:50
> +08:00
> @@ -2,6 +2,7 @@
>  # Purpose: To test having extra columns on the master WL#3915
>  #############################################################
>  -- source include/master-slave.inc
> +-- source include/have_dynamic_binlog_format.inc
>  
>  let $engine_type = 'MyISAM';
>  
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_found_rows.test
> b/mysql-test/suite/rpl/t/rpl_found_rows.test
> --- a/mysql-test/suite/rpl/t/rpl_found_rows.test	2007-11-09 16:13:39 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_found_rows.test	2008-01-17 16:23:50 +08:00
> @@ -1,4 +1,5 @@
>  source include/master-slave.inc;
> +source include/have_dynamic_binlog_format.inc;
>  
>  # It is not possible to replicate FOUND_ROWS() using statement-based
>  # replication, but there is a workaround that stores the result of
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_idempotency.test
> b/mysql-test/suite/rpl/t/rpl_idempotency.test
> --- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2007-12-12 18:14:51 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2008-01-17 16:23:50 +08:00
> @@ -2,6 +2,7 @@
>  # work the same way under statement based as under row based.
>  
>  source include/master-slave.inc;
> +source include/have_dynamic_binlog_format.inc;
>  
>  connection master;
>  CREATE TABLE t1 (a INT PRIMARY KEY);
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
> b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
> --- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2007-06-27 20:28:29 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2008-01-17 16:23:50 +08:00
> @@ -1,13 +1,10 @@
> --- source include/have_binlog_format_mixed_or_statement.inc
> +-- source include/have_binlog_format_mixed.inc
> +-- source include/have_dynamic_binlog_format.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;
> +SHOW SESSION VARIABLES LIKE 'BINLOG_FORMAT';
> +SHOW GLOBAL VARIABLES LIKE 'BINLOG_FORMAT';
>  
>  --echo **** On Master ****
>  CREATE TABLE t1 (a INT, b LONG);
> @@ -19,10 +16,13 @@ let $VERSION=`select version()`;
>  --replace_regex /table_id: [0-9]+/table_id: #/
>  SHOW BINLOG EVENTS;
>  sync_slave_with_master;
> +
> +# Get the version of the slave to do the replacement below, this is
> +# necessary for versional test
> +let $VERSION=`select version()`;
> +
>  --echo **** On Slave ****
> ---replace_result $MASTER_MYPORT MASTER_PORT
> ---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
> ---query_vertical SHOW SLAVE STATUS
> +--source include/show_slave_status2.inc
>  --replace_result $VERSION VERSION
>  --replace_column 2 # 5 #
>  --replace_regex /table_id: [0-9]+/table_id: #/
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_sf.test b/mysql-test/suite/rpl/t/rpl_sf.test
> --- a/mysql-test/suite/rpl/t/rpl_sf.test	2007-06-27 20:27:26 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_sf.test	2008-01-17 16:23:50 +08:00
> @@ -1,4 +1,5 @@
>  -- source include/have_log_bin.inc
> +-- source include/have_dynamic_binlog_format.inc
>  
>  # Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
>  
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test
> b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test
> --- a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test	2007-06-27 20:27:33 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test	2008-01-17 16:23:50 +08:00
> @@ -1,6 +1,7 @@
>  # we run first in statement-based then in mixed binlogging
>  
>  --source include/have_binlog_format_mixed_or_statement.inc
> +--source include/have_dynamic_binlog_format.inc
>  --source include/master-slave.inc
>  --source include/not_embedded.inc
>  --source include/not_windows.inc
> diff -Nrup a/mysql-test/suite/rpl/t/rpl_udf.test
> b/mysql-test/suite/rpl/t/rpl_udf.test
> --- a/mysql-test/suite/rpl/t/rpl_udf.test	2007-06-27 20:27:31 +08:00
> +++ b/mysql-test/suite/rpl/t/rpl_udf.test	2008-01-17 16:23:50 +08:00
> @@ -5,6 +5,7 @@
>  # statement based format. This tests work completed in WL#3629.   #
>  ###################################################################
>  
> +--source include/have_dynamic_binlog_format.inc
>  --source include/not_embedded.inc
>  --source include/master-slave.inc
>  
> 

Thread
[Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testHe Zhenxing29 Jan
  • Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testMagnus Svensson4 Feb
    • Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testHe Zhenxing13 Feb
      • Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testMagnus Svensson19 Feb
        • Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testHe Zhenxing20 Feb
          • Re: [Fwd: bk commit into 5.1 tree (hezx:1.2675)] versional testMagnus Svensson22 Feb