Skip to content

Commit 40eb800

Browse files
author
Shlomi Noach
authored
Merge pull request #452 from github/datetime-6-millis-corruption
timestamp/datetime submillis corruption fix
2 parents 2f4e226 + 5af587a commit 40eb800

File tree

2 files changed

+28
-1
lines changed
  • localtests/datetime-submillis-zeroleading
  • vendor/github.com/siddontang/go-mysql/replication

2 files changed

+28
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
i int not null,
5+
dt0 datetime(6),
6+
dt1 datetime(6),
7+
ts2 timestamp(6),
8+
updated tinyint unsigned default 0,
9+
primary key(id),
10+
key i_idx(i)
11+
) auto_increment=1;
12+
13+
drop event if exists gh_ost_test;
14+
delimiter ;;
15+
create event gh_ost_test
16+
on schedule every 1 second
17+
starts current_timestamp
18+
ends current_timestamp + interval 60 second
19+
on completion not preserve
20+
enable
21+
do
22+
begin
23+
insert into gh_ost_test values (null, 11, '2016-10-31 11:22:33.0123', now(), '2016-10-31 11:22:33.0369', 0);
24+
update gh_ost_test set dt1='2016-10-31 11:22:33.0246', updated = 1 where i = 11 order by id desc limit 1;
25+
26+
insert into gh_ost_test values (null, 13, '2016-10-31 11:22:33.0123', '2016-10-31 11:22:33.789', '2016-10-31 11:22:33.0369', 0);
27+
end ;;

vendor/github.com/siddontang/go-mysql/replication/row_event.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)