diff options
author | sasha@mysql.sashanet.com <> | 2001-02-14 21:31:35 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2001-02-14 21:31:35 -0700 |
commit | 4ae63ecab859a56aaae54d236f5364b99657f0b8 (patch) | |
tree | 4dc4aeb764579d792c7799e59a7ab147ef8bad0a | |
parent | 3f25e2f3be4caab648fa97b51749940a38603f59 (diff) | |
parent | afaf0cbd0f2e466d2d8eb496b0dc98b5ccd26b6e (diff) | |
download | mariadb-git-4ae63ecab859a56aaae54d236f5364b99657f0b8.tar.gz |
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
-rw-r--r-- | mysql-test/r/rpl000002.result | 4 | ||||
-rw-r--r-- | mysql-test/t/rpl000002.test | 19 | ||||
-rw-r--r-- | sql/slave.cc | 3 |
3 files changed, 24 insertions, 2 deletions
diff --git a/mysql-test/r/rpl000002.result b/mysql-test/r/rpl000002.result index 5b34f36bd05..a68ef517708 100644 --- a/mysql-test/r/rpl000002.result +++ b/mysql-test/r/rpl000002.result @@ -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 diff --git a/mysql-test/t/rpl000002.test b/mysql-test/t/rpl000002.test index c982bd54b8c..0c490e6316d 100644 --- a/mysql-test/t/rpl000002.test +++ b/mysql-test/t/rpl000002.test @@ -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; diff --git a/sql/slave.cc b/sql/slave.cc index f0e4236c29d..0c43c992c22 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -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: |