File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ;;
Original file line number Diff line number Diff line change 1+ --alter="add column is_good bit null default 0"
Original file line number Diff line number Diff line change 1+ id, i
Original file line number Diff line number Diff line change 1+ id, i
Original file line number Diff line number Diff line change 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 ;;
Original file line number Diff line number Diff line change 1+ --alter="modify column is_good bit not null default 0" --approve-renamed-columns
You can’t perform that action at this time.
0 commit comments