Added test for swapping uniqye keys without pk
This commit is contained in:
parent
dd9a3e1d0c
commit
fae95fc3e1
24
localtests/swap-uk-uk/create.sql
Normal file
24
localtests/swap-uk-uk/create.sql
Normal file
@ -0,0 +1,24 @@
|
||||
drop table if exists gh_ost_test;
|
||||
create table gh_ost_test (
|
||||
id bigint,
|
||||
i int not null,
|
||||
ts timestamp(6),
|
||||
unique key id_uidx(id),
|
||||
unique key its_uidx(i, ts)
|
||||
) ;
|
||||
|
||||
drop event if exists gh_ost_test;
|
||||
delimiter ;;
|
||||
create event gh_ost_test
|
||||
on schedule every 1 second
|
||||
starts current_timestamp
|
||||
ends current_timestamp + interval 60 second
|
||||
on completion not preserve
|
||||
enable
|
||||
do
|
||||
begin
|
||||
insert into gh_ost_test values ((unix_timestamp() << 2) + 0, 11, now(6));
|
||||
insert into gh_ost_test values ((unix_timestamp() << 2) + 1, 13, now(6));
|
||||
insert into gh_ost_test values ((unix_timestamp() << 2) + 2, 17, now(6));
|
||||
insert into gh_ost_test values ((unix_timestamp() << 2) + 3, 19, now(6));
|
||||
end ;;
|
1
localtests/swap-uk-uk/extra_args
Normal file
1
localtests/swap-uk-uk/extra_args
Normal file
@ -0,0 +1 @@
|
||||
--alter="drop key id_uidx, drop key its_uidx, add unique key its2_uidx(i, ts), add unique key id2_uidx(id)"
|
1
localtests/swap-uk-uk/order_by
Normal file
1
localtests/swap-uk-uk/order_by
Normal file
@ -0,0 +1 @@
|
||||
id
|
Loading…
Reference in New Issue
Block a user