Skip to content

Commit bca6be2

Browse files
author
Shlomi Noach
authored
Merge pull request #659 from github/test-bit-support
BIT datatype tests
2 parents 32f2b06 + c32823c commit bca6be2

6 files changed

Lines changed: 48 additions & 0 deletions

File tree

localtests/bit-add/create.sql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
primary key(id)
6+
) auto_increment=1;
7+
8+
drop event if exists gh_ost_test;
9+
delimiter ;;
10+
create event gh_ost_test
11+
on schedule every 1 second
12+
starts current_timestamp
13+
ends current_timestamp + interval 60 second
14+
on completion not preserve
15+
enable
16+
do
17+
begin
18+
insert into gh_ost_test values (null, 11);
19+
insert into gh_ost_test values (null, 13);
20+
end ;;

localtests/bit-add/extra_args

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter="add column is_good bit null default 0"

localtests/bit-add/ghost_columns

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id, i

localtests/bit-add/orig_columns

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id, i

localtests/bit-dml/create.sql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
is_good bit null default 0,
6+
primary key(id)
7+
) auto_increment=1;
8+
9+
drop event if exists gh_ost_test;
10+
delimiter ;;
11+
create event gh_ost_test
12+
on schedule every 1 second
13+
starts current_timestamp
14+
ends current_timestamp + interval 60 second
15+
on completion not preserve
16+
enable
17+
do
18+
begin
19+
insert into gh_ost_test values (null, 11, 0);
20+
insert into gh_ost_test values (null, 13, 1);
21+
insert into gh_ost_test values (null, 17, 1);
22+
23+
update gh_ost_test set is_good=0 where i=13 order by id desc limit 1;
24+
end ;;

localtests/bit-dml/extra_args

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter="modify column is_good bit not null default 0" --approve-renamed-columns

0 commit comments

Comments
 (0)