Skip to content

Commit e113d27

Browse files
author
Shlomi Noach
committed
timestamp/datetime submillis corruption fix
1 parent dd10b52 commit e113d27

File tree

1 file changed

+27
-0
lines changed
  • localtests/datetime-submillis-zeroleading

1 file changed

+27
-0
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', now(6), '2016-10-31 11:22:33.0369', 0);
27+
end ;;

0 commit comments

Comments
 (0)