added tests for unsigned rename/reorder
This commit is contained in:
parent
e256e06826
commit
d32534710e
24
localtests/unsigned-rename/create.sql
Normal file
24
localtests/unsigned-rename/create.sql
Normal file
@ -0,0 +1,24 @@
|
||||
drop table if exists gh_ost_test;
|
||||
create table gh_ost_test (
|
||||
id int auto_increment,
|
||||
i int not null,
|
||||
bi bigint not null,
|
||||
iu int unsigned not null,
|
||||
biu bigint unsigned not null,
|
||||
primary key(id)
|
||||
) auto_increment=1;
|
||||
|
||||
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 (null, -2147483647, -9223372036854775807, 4294967295, 18446744073709551615);
|
||||
set @last_insert_id := cast(last_insert_id() as signed);
|
||||
update gh_ost_test set i=-2147483647+@last_insert_id, bi=-9223372036854775807+@last_insert_id, iu=4294967295-@last_insert_id, biu=18446744073709551615-@last_insert_id where id < @last_insert_id order by id desc limit 1;
|
||||
end ;;
|
1
localtests/unsigned-rename/extra_args
Normal file
1
localtests/unsigned-rename/extra_args
Normal file
@ -0,0 +1 @@
|
||||
--alter="change column iu iu_renamed int unsigned" --approve-renamed-columns
|
1
localtests/unsigned-rename/ghost_columns
Normal file
1
localtests/unsigned-rename/ghost_columns
Normal file
@ -0,0 +1 @@
|
||||
id, i, bi, iu_renamed, biu
|
1
localtests/unsigned-rename/orig_columns
Normal file
1
localtests/unsigned-rename/orig_columns
Normal file
@ -0,0 +1 @@
|
||||
id, i, bi, iu, biu
|
24
localtests/unsigned-reorder/create.sql
Normal file
24
localtests/unsigned-reorder/create.sql
Normal file
@ -0,0 +1,24 @@
|
||||
drop table if exists gh_ost_test;
|
||||
create table gh_ost_test (
|
||||
id int auto_increment,
|
||||
i int not null,
|
||||
bi bigint not null,
|
||||
iu int unsigned not null,
|
||||
biu bigint unsigned not null,
|
||||
primary key(id)
|
||||
) auto_increment=1;
|
||||
|
||||
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 (null, -2147483647, -9223372036854775807, 4294967295, 18446744073709551615);
|
||||
set @last_insert_id := cast(last_insert_id() as signed);
|
||||
update gh_ost_test set i=-2147483647+@last_insert_id, bi=-9223372036854775807+@last_insert_id, iu=4294967295-@last_insert_id, biu=18446744073709551615-@last_insert_id where id < @last_insert_id order by id desc limit 1;
|
||||
end ;;
|
1
localtests/unsigned-reorder/extra_args
Normal file
1
localtests/unsigned-reorder/extra_args
Normal file
@ -0,0 +1 @@
|
||||
--alter="change column iu iu int unsigned after id" --approve-renamed-columns
|
1
localtests/unsigned-reorder/ghost_columns
Normal file
1
localtests/unsigned-reorder/ghost_columns
Normal file
@ -0,0 +1 @@
|
||||
id, i, bi, iu, biu
|
1
localtests/unsigned-reorder/orig_columns
Normal file
1
localtests/unsigned-reorder/orig_columns
Normal file
@ -0,0 +1 @@
|
||||
id, i, bi, iu, biu
|
Loading…
Reference in New Issue
Block a user