mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
fixed bug in timestamp replication
mysql-test/r/rpl000002.result: test timestamp replication mysql-test/t/rpl000002.test: test timestamp replication
This commit is contained in:
parent
0a4ce964b4
commit
9a17a41ed8
3 changed files with 24 additions and 2 deletions
|
@ -2,3 +2,7 @@ n
|
|||
2000
|
||||
2001
|
||||
2002
|
||||
id created
|
||||
1 1970-01-01 06:25:45
|
||||
id created
|
||||
1 1970-01-01 06:25:45
|
||||
|
|
|
@ -9,9 +9,26 @@ save_master_pos;
|
|||
connection slave;
|
||||
use test;
|
||||
sync_with_master;
|
||||
@r/rpl000002.result select * from t1;
|
||||
select * from t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
slave stop;
|
||||
connection master;
|
||||
drop table if exists t2;
|
||||
create table t2(id int auto_increment primary key, created datetime);
|
||||
set timestamp=12345;
|
||||
insert into t2 set created=now();
|
||||
select * from t2;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
slave start;
|
||||
sync_with_master;
|
||||
select * from t2;
|
||||
connection master;
|
||||
drop table t2;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
|
|
@ -857,7 +857,8 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)
|
|||
|
||||
thd->server_id = ev->server_id; // use the original server id for logging
|
||||
thd->set_time(); // time the query
|
||||
ev->when = time(NULL);
|
||||
if(!ev->when)
|
||||
ev->when = time(NULL);
|
||||
|
||||
switch(type_code) {
|
||||
case QUERY_EVENT:
|
||||
|
|
Loading…
Reference in a new issue