Loading mysql-test/r/rpl_charset.result +7 −0 Original line number Diff line number Diff line Loading @@ -207,3 +207,10 @@ select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 drop table t1; create table `t1` ( `pk` varchar(10) not null default '', primary key (`pk`) ) engine=myisam default charset=latin1; set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; mysql-test/t/rpl_charset.test +13 −0 Original line number Diff line number Diff line Loading @@ -169,3 +169,16 @@ select hex(c1), hex(c2) from t1; connection master; drop table t1; sync_slave_with_master; # # BUG#6676: Derivation of variables must be correct on slave # connection master; create table `t1` ( `pk` varchar(10) not null default '', primary key (`pk`) ) engine=myisam default charset=latin1; set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; sync_slave_with_master; sql/log_event.cc +6 −1 Original line number Diff line number Diff line Loading @@ -2531,7 +2531,12 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli) 0 can be passed as last argument (reference on item) */ e.fix_fields(thd, 0, 0); e.update_hash(val, val_len, type, charset, DERIVATION_NONE); /* A variable can just be considered as a table with a single record and with a single column. Thus, like a column value, it could always have IMPLICIT derivation. */ e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT); free_root(thd->mem_root,0); rli->inc_event_relay_log_pos(get_event_len()); Loading Loading
mysql-test/r/rpl_charset.result +7 −0 Original line number Diff line number Diff line Loading @@ -207,3 +207,10 @@ select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 drop table t1; create table `t1` ( `pk` varchar(10) not null default '', primary key (`pk`) ) engine=myisam default charset=latin1; set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1;
mysql-test/t/rpl_charset.test +13 −0 Original line number Diff line number Diff line Loading @@ -169,3 +169,16 @@ select hex(c1), hex(c2) from t1; connection master; drop table t1; sync_slave_with_master; # # BUG#6676: Derivation of variables must be correct on slave # connection master; create table `t1` ( `pk` varchar(10) not null default '', primary key (`pk`) ) engine=myisam default charset=latin1; set @p=_latin1 'test'; update t1 set pk='test' where pk=@p; drop table t1; sync_slave_with_master;
sql/log_event.cc +6 −1 Original line number Diff line number Diff line Loading @@ -2531,7 +2531,12 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli) 0 can be passed as last argument (reference on item) */ e.fix_fields(thd, 0, 0); e.update_hash(val, val_len, type, charset, DERIVATION_NONE); /* A variable can just be considered as a table with a single record and with a single column. Thus, like a column value, it could always have IMPLICIT derivation. */ e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT); free_root(thd->mem_root,0); rli->inc_event_relay_log_pos(get_event_len()); Loading