Loading mysql-test/r/rpl_charset.result +8 −0 Original line number Diff line number Diff line Loading @@ -198,4 +198,12 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 stop slave; delete from t1; change master to master_log_pos=5801; start slave until master_log_file='master-bin.000001', master_log_pos=5937; start slave; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 drop table t1; mysql-test/t/rpl_charset.test +18 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,24 @@ INSERT INTO t1 (c1, c2) VALUES (' select hex(c1), hex(c2) from t1; sync_slave_with_master; select hex(c1), hex(c2) from t1; # Now test for BUG##5705: SET CHARATER_SET_SERVERetc will be lost if # STOP SLAVE before following query stop slave; delete from t1; change master to master_log_pos=5801; start slave until master_log_file='master-bin.000001', master_log_pos=5937; # Slave is supposed to stop _after_ the INSERT, even though 5937 is # the position of the beginning of the INSERT; after SET slave is not # supposed to increment position. wait_for_slave_to_stop; # When you merge this into 5.0 you will have to adjust positions # above; the first master_log_pos above should be the one of the SET, # the second should be the one of the INSERT. start slave; sync_with_master; select hex(c1), hex(c2) from t1; connection master; drop table t1; sync_slave_with_master; sql/log_event.cc +9 −1 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,15 @@ Default database: '%s'. Query: '%s'", VOID(pthread_mutex_unlock(&LOCK_thread_count)); close_thread_tables(thd); free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC)); return (thd->query_error ? thd->query_error : Log_event::exec_event(rli)); /* If there was an error we stop. Otherwise we increment positions. Note that we will not increment group* positions if we are just after a SET ONE_SHOT, because SET ONE_SHOT should not be separated from its following updating query. */ return (thd->query_error ? thd->query_error : (thd->one_shot_set ? (rli->inc_event_relay_log_pos(get_event_len()),0) : Log_event::exec_event(rli))); } #endif Loading Loading
mysql-test/r/rpl_charset.result +8 −0 Original line number Diff line number Diff line Loading @@ -198,4 +198,12 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 stop slave; delete from t1; change master to master_log_pos=5801; start slave until master_log_file='master-bin.000001', master_log_pos=5937; start slave; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 drop table t1;
mysql-test/t/rpl_charset.test +18 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,24 @@ INSERT INTO t1 (c1, c2) VALUES (' select hex(c1), hex(c2) from t1; sync_slave_with_master; select hex(c1), hex(c2) from t1; # Now test for BUG##5705: SET CHARATER_SET_SERVERetc will be lost if # STOP SLAVE before following query stop slave; delete from t1; change master to master_log_pos=5801; start slave until master_log_file='master-bin.000001', master_log_pos=5937; # Slave is supposed to stop _after_ the INSERT, even though 5937 is # the position of the beginning of the INSERT; after SET slave is not # supposed to increment position. wait_for_slave_to_stop; # When you merge this into 5.0 you will have to adjust positions # above; the first master_log_pos above should be the one of the SET, # the second should be the one of the INSERT. start slave; sync_with_master; select hex(c1), hex(c2) from t1; connection master; drop table t1; sync_slave_with_master;
sql/log_event.cc +9 −1 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,15 @@ Default database: '%s'. Query: '%s'", VOID(pthread_mutex_unlock(&LOCK_thread_count)); close_thread_tables(thd); free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC)); return (thd->query_error ? thd->query_error : Log_event::exec_event(rli)); /* If there was an error we stop. Otherwise we increment positions. Note that we will not increment group* positions if we are just after a SET ONE_SHOT, because SET ONE_SHOT should not be separated from its following updating query. */ return (thd->query_error ? thd->query_error : (thd->one_shot_set ? (rli->inc_event_relay_log_pos(get_event_len()),0) : Log_event::exec_event(rli))); } #endif Loading