File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed 
localtests/rename-reorder-column Expand file tree Collapse file tree 4 files changed +29
-0
lines changed 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+   c1 int  not null ,
5+   c2 int  not null ,
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 ignore into  gh_ost_test values  (1 , 11 , 23 );
20+   insert ignore into  gh_ost_test values  (2 , 13 , 23 );
21+   insert into  gh_ost_test values  (null , 17 , 23 );
22+   set  @last_insert_id :=  last_insert_id();
23+   update  gh_ost_test set  c1= c1+ @last_insert_id, c2= c2+ @last_insert_id where  id= @last_insert_id order by  id desc  limit  1 ;
24+   delete  from  gh_ost_test where  id= 1 ;
25+   delete  from  gh_ost_test where  c1= 13 ; --  id=2
26+ end ;;
Original file line number Diff line number Diff line change 1+ --alter="change column c2 c2a int not null after id" --approve-renamed-columns
Original file line number Diff line number Diff line change 1+ id, c1, c2a
Original file line number Diff line number Diff line change 1+ id, c1, c2
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments