Skip to content

Commit 03b8dad

Browse files
author
Shlomi Noach
committed
added generated column rename test
1 parent db871b4 commit 03b8dad

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
a int not null,
5+
b int not null,
6+
sum_ab int as (a + b) virtual not null,
7+
primary key(id)
8+
) auto_increment=1;
9+
10+
drop event if exists gh_ost_test;
11+
delimiter ;;
12+
create event gh_ost_test
13+
on schedule every 1 second
14+
starts current_timestamp
15+
ends current_timestamp + interval 60 second
16+
on completion not preserve
17+
enable
18+
do
19+
begin
20+
insert into gh_ost_test (id, a, b) values (null, 2,3);
21+
insert into gh_ost_test (id, a, b) values (null, 2,4);
22+
insert into gh_ost_test (id, a, b) values (null, 2,5);
23+
insert into gh_ost_test (id, a, b) values (null, 2,6);
24+
insert into gh_ost_test (id, a, b) values (null, 2,7);
25+
insert into gh_ost_test (id, a, b) values (null, 2,8);
26+
insert into gh_ost_test (id, a, b) values (null, 2,9);
27+
insert into gh_ost_test (id, a, b) values (null, 2,0);
28+
insert into gh_ost_test (id, a, b) values (null, 2,1);
29+
insert into gh_ost_test (id, a, b) values (null, 2,2);
30+
end ;;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter="change sum_ab total_ab int as (a + b) virtual not null" --approve-renamed-columns
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(5.5|5.6)

0 commit comments

Comments
 (0)