Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online DDL/VReplication: add PK DATETIME->TIMESTAMP test #8338

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
change column t t timestamp default current_timestamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
drop table if exists onlineddl_test;
create table onlineddl_test (
id int unsigned auto_increment,
i int not null,
ts0 timestamp default current_timestamp,
ts1 timestamp null,
dt2 datetime,
t datetime default current_timestamp,
updated tinyint unsigned default 0,
primary key(id, t),
key i_idx(i)
) auto_increment=1;

drop event if exists onlineddl_test;
delimiter ;;
create event onlineddl_test
on schedule every 1 second
starts current_timestamp
ends current_timestamp + interval 60 second
on completion not preserve
enable
do
begin
insert into onlineddl_test values (null, 7, null, now(), now(), '2010-10-20 10:20:30', 0);

insert into onlineddl_test values (null, 11, null, now(), now(), '2010-10-20 10:20:30', 0);
update onlineddl_test set dt2=now() + interval 1 minute, updated = 1 where i = 11 order by id desc limit 1;

insert into onlineddl_test values (null, 13, null, now(), now(), '2010-10-20 10:20:30', 0);
update onlineddl_test set t=t + interval 1 minute, updated = 1 where i = 13 order by id desc limit 1;
end ;;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(5.5)