From: Alfranio Correia Date: October 21 2009 11:41am Subject: Re: Review of WL#5072 List-Archive: http://lists.mysql.com/commits/87622 Message-Id: <4ADEF376.2060505@sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_K8AZ+ENgROleeVnWVXJlLg)" --Boundary_(ID_K8AZ+ENgROleeVnWVXJlLg) Content-type: text/plain; CHARSET=US-ASCII Content-transfer-encoding: 7BIT Hi Sven, I did something a little bit different to avoid the race condition. I disabled the replication but kept the binary and the execution under the rpl suite. Find a diff in attachment. Cheers. Sven Sandberg wrote: > Alfranio Correia wrote: >> Hi Sven, >> >> Sven Sandberg wrote: >>> Hi Alfranio, >>> >>> Great work with refactoring and adding comments! The comments you added >>> are very clear, making the test *much* easier to follow. I'm very happy >>> with this. >>> >>> Just one simple problem: >>> >>> (S1) Since there is no sync_slave_with_master in >>> rpl_implicit_commit_binlog.test, there is a race in the test (so it will >>> fail sporadically in pushbuild). See details inline. >> >> I know that. It fails sporadically. >> >> I thought about disabling the test case and re-enabling it as soon as >> the bug >> was fixed. However, I can do what you suggested. >> >> Is this is the only comment you have? > > Yes, I think the test case is very good now, only this race shold be fixed. > > /Sven > > >> >> >> Cheers. >> >> >>>> --echo >>>> ################################################################################### >>>> >>>> >>>> --echo # CLEAN >>>> --echo >>>> ################################################################################### >>>> >>>> >>>> connection master; >>>> >>>> SET SQL_LOG_BIN=0; >>>> DROP TABLE tt_1; >>>> DROP TABLE tt_2; >>>> SET SQL_LOG_BIN=1; >>>> >>>> connection slave; >>>> >>>> SET SQL_LOG_BIN=0; >>>> DROP TABLE tt_1; >>>> DROP TABLE tt_2; >>> (S1) There is a race between the slave sql thread and the connection >>> issuing 'drop table', since we don't do sync_slave_with_master. If the >>> slave sql thread has not received 'create table' yet, then it will fail >>> on 'DROP TABLE'. >>> >>> There is also a race between the slave sql thread and check-testcase. >>> For example, if the slave has executed 'create view' but not 'drop view' >>> when check-testcase runs, then check-testcase will report an error. >>> >>> I would suggest that you run the entire test with SQL_LOG_BIN=0 on >>> master until BUG#46572 is fixed. >>> >>>> SET SQL_LOG_BIN=1; >>>> >>>> #Re-enable this after fixing failures for BUG#46572 >>>> #sync_slave_with_master; >>> >>> >>> >>> > > --Boundary_(ID_K8AZ+ENgROleeVnWVXJlLg) Content-type: text/x-patch; name=wl-5072.patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=wl-5072.patch --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test 2009-10-19 10:37:58.000000000 +0100 +++ mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test 2009-10-21 12:08:25.000000000 +0100 @@ -19,7 +19,8 @@ --echo ######################################################################### --echo # CONFIGURATION --echo ######################################################################### -connection master; +#Re-enable this after fixing BUG#46572 +#connection master; CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = Innodb; CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = Innodb; @@ -352,7 +353,7 @@ --echo ################################################################################### --echo # CHECK CONSISTENCY --echo ################################################################################### -# Re-enable this after fixing failures for BUG#46572 +# Re-enable this after fixing BUG#46572 # #--sync_slave_with_master # # #--let $diff_table_1= master:test.tt_1 @@ -363,19 +364,12 @@ --echo ################################################################################### --echo # CLEAN --echo ################################################################################### -connection master; +#Re-enable this after fixing BUG#46572 +#connection master; -SET SQL_LOG_BIN=0; DROP TABLE tt_1; DROP TABLE tt_2; -SET SQL_LOG_BIN=1; -connection slave; -SET SQL_LOG_BIN=0; -DROP TABLE tt_1; -DROP TABLE tt_2; -SET SQL_LOG_BIN=1; - -#Re-enable this after fixing failures for BUG#46572 +#Re-enable this after fixing BUG#46572 #sync_slave_with_master; --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test 2009-10-15 00:26:35.000000000 +0100 +++ mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test 2009-10-21 12:12:53.000000000 +0100 @@ -2,7 +2,8 @@ # Check file extra/rpl_tests/rpl_implicit_commit_binlog.test ################################################################################ --source include/have_binlog_format_row.inc ---source include/master-slave.inc +#Re-enable this after fixing BUG#46572 +#--source include/master-slave.inc --source include/have_innodb.inc --source extra/rpl_tests/rpl_implicit_commit_binlog.test --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test 2009-10-15 00:26:20.000000000 +0100 +++ mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test 2009-10-21 12:12:59.000000000 +0100 @@ -2,7 +2,8 @@ # Check file extra/rpl_tests/rpl_implicit_commit_binlog.test ################################################################################ --source include/have_binlog_format_statement.inc ---source include/master-slave.inc +#Re-enable this after fixing BUG#46572 +#--source include/master-slave.inc --source include/have_innodb.inc --source extra/rpl_tests/rpl_implicit_commit_binlog.test --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test 2009-10-15 00:26:10.000000000 +0100 +++ mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test 2009-10-21 12:12:41.000000000 +0100 @@ -2,7 +2,8 @@ # Check file extra/rpl_tests/rpl_implicit_commit_binlog.test ################################################################################ --source include/have_binlog_format_mixed.inc ---source include/master-slave.inc +#Re-enable this after fixing BUG#46572 +#--source include/master-slave.inc --source include/have_innodb.inc --source extra/rpl_tests/rpl_implicit_commit_binlog.test --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result 2009-10-15 11:49:26.000000000 +0100 +++ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result 2009-10-21 12:09:29.000000000 +0100 @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; ######################################################################### # CONFIGURATION ######################################################################### --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result 2009-10-15 00:27:05.000000000 +0100 +++ mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result 2009-10-21 12:13:22.000000000 +0100 @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; ######################################################################### # CONFIGURATION ######################################################################### --- /home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-40278/mysql-pe-wl2687-push/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result 2009-10-15 00:27:22.000000000 +0100 +++ mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result 2009-10-21 12:14:01.000000000 +0100 @@ -1,9 +1,3 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; ######################################################################### # CONFIGURATION ######################################################################### --Boundary_(ID_K8AZ+ENgROleeVnWVXJlLg)--