Skip to content

Commit 2c6b79c

Browse files
author
Shlomi Noach
committed
test: add generated column
1 parent 5275ad9 commit 2c6b79c

6 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
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 (id, a, b) values (null, 2,3);
20+
insert into gh_ost_test (id, a, b) values (null, 2,4);
21+
insert into gh_ost_test (id, a, b) values (null, 2,5);
22+
insert into gh_ost_test (id, a, b) values (null, 2,6);
23+
insert into gh_ost_test (id, a, b) values (null, 2,7);
24+
insert into gh_ost_test (id, a, b) values (null, 2,8);
25+
insert into gh_ost_test (id, a, b) values (null, 2,9);
26+
insert into gh_ost_test (id, a, b) values (null, 2,0);
27+
insert into gh_ost_test (id, a, b) values (null, 2,1);
28+
insert into gh_ost_test (id, a, b) values (null, 2,2);
29+
end ;;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--alter="add column sum_ab int as (a + b) virtual not null"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id, a, b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(5.5|5.6)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id, a, b

0 commit comments

Comments
 (0)