List:Commits« Previous MessageNext Message »
From:Libing Song Date:May 7 2010 12:04pm
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)
Bug#49741
View as plain text  
Hi Sven,
Thanks for your careful review.
I followed most of your comments, while I have different understand on a
few your comments. Please check my comments below.


> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_change_master.test'
> > --- a/mysql-test/suite/rpl/t/rpl_change_master.test	2008-02-28 11:36:14 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_change_master.test	2010-04-28 08:26:07 +0000
> > @@ -20,9 +20,22 @@ let $slave_param_value= query_get_value(
> >  connection slave;
> >  source include/wait_for_slave_param.inc;
> >  stop slave;
> > -source include/show_slave_status2.inc;
> > +source include/wait_for_slave_to_stop.inc;
> 
> We can simplify the lines above, from start slave until here, and 
> replace them by source include/stop_slave.inc.
But 'START SLAVE UNTIL master_log_pos=pos' stops until SQL thread
applies the position, that isn't what we want.
The test want that IO thread has replicated the position and SQL thread
hasn't applied it. 
> 
> > +
> > +let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
> > +let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
> > +if (`SELECT $read_pos = $exec_pos`)
> > +{
> > +  echo 'read_pos: $read_pos' == 'exec_pos: $exec_pos';
> > +} 
> 
> We don't need to check Read_Master_Log_Pos and Exec_Master_Log_Pos 
> because stop_slave.inc (i.e., wait_for_slave_to_stop) already checks the 
> positions. I suggest to remove all the lines above, from 'let 
> $read_pos...' to here.
> >  change master to master_user='root';
> > -source include/show_slave_status2.inc;
> > +let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
> > +let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
> > +if (`SELECT $read_pos <> $exec_pos`)
> > +{
> > +  echo 'read_pos: $read_pos' <> 'exec_pos: $exec_pos';
> > +}
> > +
> >  start slave;
> 
> Similar to above, please replace everything above except change master 
> by 'source include/start_slave.inc'.
> 
The test want to be sure that Read_Master_Log_Pos should be equal to
Exec_Master_Log_Pos after 'CHANGE MASTER' statement. 
> >  sync_with_master;
> >  select * from t1;
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_critical_errors.test'
> > --- a/mysql-test/suite/rpl/t/rpl_critical_errors.test	2007-12-06 15:27:10 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test	2010-04-28 08:26:07 +0000
> > @@ -60,8 +60,7 @@ connection slave;
> > # Here the slave will only stop if the query above actually started
> > # inserting some rows into t2. Otherwise, it will hang forever.
> >---source include/wait_for_slave_to_stop.inc
> >
> > # The following should be 0
> >  SELECT COUNT(*) FROM t2;
> >  
> >  # ... and there the error code should be 1317 (ER_QUERY_INTERRUPTED)
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 # 7 # 8 # 9 # 20 # 22 # 23 # 33 #
> > -query_vertical SHOW SLAVE STATUS;
> > +let $error_form= 'NUMBER', 'STARTING';
> > +source include/show_slave_error_status.inc;
> 
> Please replace the above, starting from wait_for_slave_to_stop.inc, by this:
> 
> # 1317 = ER_QUERY_INTERRUPTED
> --let $slave_sql_errno= 1317
> --source include/wait_for_slave_sql_error.inc
> 
> # The following should be 0
> SELECT COUNT(*) FROM t2;
> 
> >  
> >  enable_parsing;
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_flushlog_loop.test'
> > --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test	2008-11-12 17:51:47 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test	2010-04-28 08:26:07 +0000
> 
> Please use rpl_flushlog_loop.test from http://lists.mysql.com/commits/106824
> 
> It uses check_slave_is_running.inc and contains some more improvements.
> 
> > === modified file 'mysql-test/suite/rpl/t/rpl_grant.test'
> > --- a/mysql-test/suite/rpl/t/rpl_grant.test	2008-10-03 15:54:22 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_grant.test	2010-04-28 08:26:07 +0000
> > @@ -36,5 +36,3 @@ sync_slave_with_master;
> >  --echo **** On Slave ****
> >  SELECT user,host FROM mysql.user WHERE user like 'dummy%';
> >  SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
> > -
> > -source include/show_slave_status2.inc;
> I think the purpose of show_slave_status2.inc here was to check that the 
> slave is still running. Could you use check_slave_is_running.inc instead?
> 
Yes, but don't you think it means slave are running well if
sync_slave_with_master has well done?

> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test'
> > --- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2008-07-16 09:17:10 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test	2010-04-28 08:26:07 +0000
> > @@ -15,20 +15,10 @@ SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION
> >  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;
> > +source include/show_binlog_events.inc;
> >  sync_slave_with_master;
> >  --echo **** On Slave ****
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
> > ---query_vertical SHOW SLAVE STATUS
> > ---replace_result $VERSION VERSION
> > ---replace_column 2 # 5 #
> > ---replace_regex /table_id: [0-9]+/table_id: #/
> > -SHOW BINLOG EVENTS;
> > +source include/show_binlog_events.inc;
> 
> Here, I think the purpose of show slave status was to check that the 
> slave is still running. Could you source check_slave_is_running.inc here?
> 
see above.
and I think show_binlog_events is used to check whether SQL thread
binlogs row event correctly.
So it is better to keep it.

> 
> > === modified file 'mysql-test/suite/rpl/t/rpl_slave_skip.test'
> > --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test	2010-03-01 12:33:15 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test	2010-04-28 08:26:07 +0000
> > @@ -14,6 +14,7 @@ CREATE TABLE t1 (a INT, b INT);
> >  CREATE TABLE t2 (c INT, d INT);
> >  INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
> >  INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
> > +let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
> >  UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c;
> >  source include/show_binlog_events.inc;
> >  
> > @@ -21,16 +22,17 @@ source include/show_binlog_events.inc;
> >  SELECT * FROM t1;
> >  SELECT * FROM t2;
> >  save_master_pos;
> > -
> >  --echo **** On Slave ****
> >  connection slave;
> >  
> >  # Stop when reaching the the first table map event.
> > -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
> > +--replace_result $master_log_pos MASTER_LOG_POS
> > +eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001',
> MASTER_LOG_POS=$master_log_pos;
> >  source include/wait_for_slave_sql_to_stop.inc;
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
> > -query_vertical SHOW SLAVE STATUS;
> > +let $slave_param= Exec_Master_Log_Pos;
> > +let $slave_param_value= $master_log_pos;
> > +source include/wait_for_slave_param.inc;
> > +source include/show_slave_error_status.inc;
> 
> Please use check_slave_param instead of wait_for_slave_param. It is not 
> correct to wait because the slave has already stopped.
> 
> Also, please use check_slave_no_error instead of show_slave_error_status.
> 
> >  
> >  # Now we skip *one* table map event. If the execution starts right
> >  # after that table map event, *one* of the involved tables will be
> > @@ -53,19 +55,18 @@ RESET MASTER;
> >  
> >  SET SESSION BINLOG_FORMAT=STATEMENT;
> >  SET @foo = 12;
> > +let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
> >  INSERT INTO t1 VALUES(@foo, 2*@foo);
> >  save_master_pos;
> >  source include/show_binlog_events.inc;
> >  
> >  connection slave;
> > -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
> > +--replace_result $master_log_pos MASTER_LOG_POS
> > +eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001',
> MASTER_LOG_POS=$master_log_pos;
> >  source include/wait_for_slave_sql_to_stop.inc;
> >  SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
> >  START SLAVE;
> >  sync_with_master;
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
> > -query_vertical SHOW SLAVE STATUS;
> 
> Here, I think the purpose of show slave status was to check that the 
> slave is still running. So please source check_slave_is_running.inc
> 
see above. 
> >  
> >  --echo **** On Master ****
> >  connection master;
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_ssl.test'
> > --- a/mysql-test/suite/rpl/t/rpl_ssl.test	2007-12-05 19:33:36 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_ssl.test	2010-04-28 08:26:07 +0000
> > @@ -30,9 +30,10 @@ select * from t1;
> >  
> >  # The slave is synced and waiting/reading from master
> >  # SHOW SLAVE STATUS will show "Waiting for master to send event"
> > ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
> > ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
> > -query_vertical show slave status;
> > +let $status_items= 'Master_SSL_Allowed',
> > +    'Master_SSL_CA_Path', 'Master_SSL_CA_File', 'Master_SSL_Cert',
> > +    'Master_SSL_Key', 'Last_IO_Error', 'Last_SQL_Error';
> 
> I think the purpose of show slave status below is to check both the SSL 
> fields and to check that the slave is running. Hence, I suggest to use 
> check_slave_is_running.inc. Then we can also remove Last_IO_Error and 
> Last_SQL_Error above. (Note that Last_IO_Error is sometimes set to an 
> error due to temporary connection problems, so we should avoid printing it.)
> 
> > +source include/show_slave_status.inc;
> 
> Please also source include/check_slave_is_running.inc
> 
> >  
> >  # Stop the slave, as reported in bug#21871 it would hang
> >  STOP SLAVE;
> > @@ -70,9 +71,7 @@ let $master_count= `select count(*) from
> >  
> >  sync_slave_with_master;
> >  --source include/wait_for_slave_to_start.inc
> > ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
> > ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
> > -query_vertical show slave status;
> > +source include/show_slave_status.inc;
> 
> Please also source include/check_slave_is_running.inc
> 
> >  
> >  let $slave_count= `select count(*) from t1`;
> >  
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_ssl1.test'
> > --- a/mysql-test/suite/rpl/t/rpl_ssl1.test	2007-12-06 15:27:10 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_ssl1.test	2010-04-28 08:26:07 +0000
> > @@ -45,9 +45,10 @@ sync_with_master;
> >  select * from t1;
> >  
> >  #checking show slave status
> > ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
> > ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
> > -query_vertical show slave status;
> > +let $status_items= 'Master_SSL_Allowed',
> > +    'Master_SSL_CA_Path', 'Master_SSL_CA_File', 'Master_SSL_Cert',
> > +    'Master_SSL_Key', 'Last_IO_Error', 'Last_SQL_Error';
> > +source include/show_slave_status.inc;
> 
> Similar to rpl_ssl.test: please remove Last_IO_Error and Last_SQL_Error, 
> and please also source include/check_slave_is_running.inc
> 
> >  
> >  #checking if replication works without ssl also performing clean up
> >  stop slave;
> > @@ -59,10 +60,7 @@ drop table t1;
> >  save_master_pos;
> >  connection slave;
> >  sync_with_master;
> > ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
> > ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
> > -query_vertical show slave status;
> > -
> > +source include/show_slave_status.inc;
> 
> Please also source include/check_slave_is_running.inc
> 
> >  # End of 4.1 tests
> >  
> >  # Start replication with ssl_verify_server_cert turned on
> > @@ -89,9 +87,7 @@ echo on slave;
> >  select * from t1;
> >  
> >  #checking show slave status
> > ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
> > ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
> > -query_vertical show slave status;
> > +source include/show_slave_status.inc;
> 
> Please also source include/check_slave_is_running.inc
> 
> >  
> >  connection master;
> >  drop table t1;
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_stm_until.test'
> > --- a/mysql-test/suite/rpl/t/rpl_stm_until.test	2010-01-27 17:27:49 +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test	2010-04-28 08:26:07 +0000
> > @@ -34,9 +34,11 @@ sync_slave_with_master;
> >  connection master;
> >  create table t1(n int not null auto_increment primary key);
> >  insert into t1 values (1),(2),(3),(4);
> > +let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
> >  drop table t1;
> >  create table t2(n int not null auto_increment primary key);
> >  insert into t2 values (1),(2);
> > +let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
> >  insert into t2 values (3),(4);
> >  drop table t2;
> >  
> > @@ -45,27 +47,39 @@ drop table t2;
> >  # try to replicate all queries until drop of t1
> >  --echo [on slave]
> >  connection slave;
> > -start slave until master_log_file='master-bin.000001', master_log_pos=323;
> > +--replace_result $master_log_pos_1 MASTER_LOG_POS
> > +eval start slave until master_log_file='master-bin.000001',
> master_log_pos=$master_log_pos_1;
> >  --source include/wait_for_slave_io_to_start.inc
> >  --source include/wait_for_slave_sql_to_stop.inc
> >  # here table should be still not deleted
> >  select * from t1;
> > -source include/show_slave_status2.inc;
> > +--let $slave_param= Exec_Master_Log_Pos
> > +--let $slave_param_value= $master_log_pos_1
> > +--source include/wait_for_slave_param.inc
> 
> Please use check_slave_param instead of wait_for_slave_param
> 
> >  
> >  # this should fail right after start
> > +--replace_result 291 MASTER_LOG_POS
> >  start slave until master_log_file='master-no-such-bin.000001',
> master_log_pos=291;
> >  --source include/wait_for_slave_io_to_start.inc
> >  --source include/wait_for_slave_sql_to_stop.inc
> >  # again this table should be still not deleted
> >  select * from t1;
> > -source include/show_slave_status2.inc;
> > -
> > +--let $slave_param= Exec_Master_Log_Pos
> > +--let $slave_param_value= $master_log_pos_1
> > +--source include/wait_for_slave_param.inc
> 
> Please use check_slave_param instead of wait_for_slave_param
> 
> > +
> > +let $relay_log_file= slave-relay-bin.000004;
> > +let $master_log_pos= $master_log_pos_2;
> > +source include/get_relay_log_pos.inc;
> >  # try replicate all up to and not including the second insert to t2;
> > -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
> > +--replace_result $relay_log_pos RELAY_LOG_POS
> > +eval start slave until relay_log_file='$relay_log_file',
> relay_log_pos=$relay_log_pos;
> >  --source include/wait_for_slave_io_to_start.inc
> >  --source include/wait_for_slave_sql_to_stop.inc
> >  select * from t2;
> > -source include/show_slave_status2.inc;
> > +--let $slave_param= Exec_Master_Log_Pos
> > +--let $slave_param_value= $master_log_pos
> > +--source include/wait_for_slave_param.inc
> 
> Please use check_slave_param instead of wait_for_slave_param
> 
> >  
> >  # clean up
> >  start slave;
> > @@ -75,27 +89,34 @@ connection master;
> >  sync_slave_with_master;
> >  --source include/stop_slave.inc
> >  
> > +--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos,
> 1)
> >  # this should stop immediately as we are already there
> > -start slave until master_log_file='master-bin.000001', master_log_pos=776;
> > +--replace_result $master_log_pos_2 MASTER_LOG_POS
> > +eval start slave until master_log_file='master-bin.000001',
> master_log_pos=$master_log_pos_2;
> >  --source include/wait_for_slave_io_to_start.inc
> >  --source include/wait_for_slave_sql_to_stop.inc
> > ---replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007
> bin.000004
> > -source include/show_slave_status2.inc;
> > +--let $slave_param= Exec_Master_Log_Pos
> > +--let $slave_param_value= $exec_log_pos_1
> > +--source include/wait_for_slave_param.inc
> 
> Please use check_slave_param instead of wait_for_slave_param
> 
> >  
> >  --echo ==== Test various error conditions ====
> >  
> > +--replace_result 561 MASTER_LOG_POS
> >  --error 1277
> >  start slave until master_log_file='master-bin', master_log_pos=561;
> > +--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
> >  --error 1277
> >  start slave until master_log_file='master-bin.000001', master_log_pos=561,
> relay_log_pos=12;
> >  --error 1277
> >  start slave until master_log_file='master-bin.000001';
> >  --error 1277
> >  start slave until relay_log_file='slave-relay-bin.000002';
> > +--replace_result 561 MASTER_LOG_POS
> >  --error 1277
> >  start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
> >  # Warning should be given for second command
> >  start slave sql_thread;
> > +--replace_result 776 MASTER_LOG_POS
> >  start slave until master_log_file='master-bin.000001', master_log_pos=776;
> >  
> >  #
> > 
> > === modified file 'mysql-test/suite/rpl/t/rpl_temporary_errors.test'
> > --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2008-10-13 18:33:08
> +0000
> > +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2010-04-28 08:26:07
> +0000
> > @@ -25,7 +25,7 @@ sync_slave_with_master;
> >  set @@global.slave_exec_mode= default;
> >  SHOW STATUS LIKE 'Slave_retried_transactions';
> >  SELECT * FROM t1;
> > -source include/show_slave_status2.inc;
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use check_slave_is_running instead of 
> show_slave_running_and_error_status.inc
> 
> >  DROP TABLE t1;
> >  
> >  --echo **** On Master ****
> > 
> > === modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test'
> > --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test	2008-07-10 16:09:39 +0000
> > +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test	2010-04-28 08:26:07 +0000
> > @@ -192,9 +192,8 @@ source include/wait_for_slave_sql_to_sto
> >  
> >  # Replication should have stopped, since max retries were not enough.
> >  # verify with show slave status
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
> <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19
> <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23
> <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36
> <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
> > ---query_vertical SHOW SLAVE STATUS;
> > +let $error_type= 'IO', 'SQL';
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use this instead:
> 
> # 1205 = ER_LOCK_WAIT_TIMEOUT
> --let $slave_sql_errno= 1205
> --let $show_slave_sql_error= 1
> --source include/wait_for_slave_sql_error.inc
> 
> >  
> >  # now set max retries high enough to succeed, and start slave again
> >  set GLOBAL slave_transaction_retries=10;
> > 
> > === modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test'
> > --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test	2009-09-27 22:03:05
> +0000
> > +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test	2010-04-28 08:26:07
> +0000
> 
> Please use rpl_ndb_circular.test from http://lists.mysql.com/commits/106824
> 
> It uses check_slave_is_running and contains additional simplifications.
> 
> > === modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test'
> > --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test	2009-09-27
> 22:03:05 +0000
> > +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test	2010-04-28
> 08:26:07 +0000
> 
> Please use rpl_ndb_circular_simplex.test from 
> http://lists.mysql.com/commits/106824
> 
> It uses check_slave_is_running and contains additional simplifications.
> 
> > === modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test'
> > --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test	2007-07-25 13:40:43
> +0000
> > +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test	2010-04-28 08:26:07
> +0000
> > @@ -42,9 +42,7 @@ SELECT * FROM t1 ORDER BY c3;
> >  --connection slave
> >  SELECT * FROM t1 ORDER BY c3;
> >  
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
> <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
> <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35
> <Last_IO_Errno> 36 <Last_IO_Error>
> > -SHOW SLAVE STATUS;
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use check_slave_is_running instead
> 
> >  
> >  # stop slave and reset position to before the last changes
> >  STOP SLAVE;
> > @@ -53,9 +51,7 @@ eval CHANGE MASTER TO
> >    master_log_file = '$the_file',
> >    master_log_pos = $the_pos ;
> >  
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
> <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
> <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35
> <Last_IO_Errno> 36 <Last_IO_Error>
> > -SHOW SLAVE STATUS;
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use check_slave_no_error instead
> 
> >  
> >  # start the slave again
> >  # -> same events should have been applied again
> > @@ -106,9 +102,7 @@ COMMIT;
> >  --sync_slave_with_master
> >  --connection slave
> >  SELECT * FROM t1;
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
> <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
> <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34
> <Last_IO_Errno> 35 <Last_IO_Error>
> > -SHOW SLAVE STATUS;
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use check_slave_is_running instead
> 
> >  
> >  connection master;
> >  DROP TABLE IF EXISTS t1;
> > 
> > === modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test'
> > --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test	2007-12-12 17:19:24 +0000
> > +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test	2010-04-28 08:26:07 +0000
> > @@ -71,9 +71,7 @@ START SLAVE;
> >  --connection master
> >  --sync_slave_with_master
> >  --connection slave
> > ---replace_result $MASTER_MYPORT MASTER_PORT
> > ---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8
> <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22
> <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35
> <Last_IO_Errno> 36 <Last_IO_Error>
> > -query_vertical SHOW SLAVE STATUS;
> > +source include/show_slave_running_and_error_status.inc;
> 
> Please use check_slave_is_running instead.
> 
> >  
> >  SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
> >  SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
> > 
> > === modified file 'mysql-test/t/sp_trans_log.test'
> > --- a/mysql-test/t/sp_trans_log.test	2009-04-28 18:42:17 +0000
> > +++ b/mysql-test/t/sp_trans_log.test	2010-04-28 08:26:07 +0000
> > @@ -34,8 +34,8 @@ end|
> >  reset master|
> >  --error ER_DUP_ENTRY
> >  insert into t2 values (bug23333(),1)| 
> > ---replace_column 2 # 5 # 6 #
> > -show binlog events from 106 /* with fixes for #23333 will show there is the
> query */|
> > +#23333 will show there is the query */|
> 
> Part of this comment was lost. Please restore the comment.
> 
> > +--source include/show_binlog_events.inc
> >  select count(*),@a from t1 /* must be 1,1 */|
> >  
> >  delimiter ;|
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > 
> 
> 

-- 
Your Sincerely,
Libing Song
==================================
MySQL Replication Team
Software Engineer


Email : Li-Bing.Song@stripped
Skype : libing.song
MSN   : slb_database@stripped
Phone : +86 010-6505-4020 ext. 319
Mobile: +86 138-1144-2038
==================================


Thread
bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360) Bug#49741Li-Bing.Song28 Apr
  • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Sven Sandberg4 May
    • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Libing Song7 May
      • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Sven Sandberg10 May
  • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Luís Soares7 May
    • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Libing Song11 May
    • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Libing Song11 May
      • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Luís Soares13 May
        • Re: bzr commit into mysql-5.1-bugteam branch (Li-Bing.Song:3360)Bug#49741Libing Song13 May