diff --git a/localtests/swap-uk-uk/create.sql b/localtests/swap-uk-uk/create.sql new file mode 100644 index 0000000..5fcbf32 --- /dev/null +++ b/localtests/swap-uk-uk/create.sql @@ -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 ;; diff --git a/localtests/swap-uk-uk/extra_args b/localtests/swap-uk-uk/extra_args new file mode 100644 index 0000000..84161a5 --- /dev/null +++ b/localtests/swap-uk-uk/extra_args @@ -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)" diff --git a/localtests/swap-uk-uk/order_by b/localtests/swap-uk-uk/order_by new file mode 100644 index 0000000..074d1ee --- /dev/null +++ b/localtests/swap-uk-uk/order_by @@ -0,0 +1 @@ +id