You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/deploy/mysql_test/test_suite/column_store/t/basic_column_group_syntax.test
+29-29Lines changed: 29 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -8,50 +8,50 @@ connection sys_conn;
8
8
--disable_query_log
9
9
--disable_warnings
10
10
set @@recyclebin = off;
11
-
drop table if exists tt1;
12
-
drop table if exists tt2;
11
+
drop table if exists cg_tt1;
12
+
drop table if exists cg_tt2;
13
13
--enable_warnings
14
14
--enable_query_log
15
15
16
-
create table tt1(a int, b int, c int, primary key(a)) with column group (all columns, each column);
17
-
create index idx_tt1 on tt1(b);
18
-
create table tt2(d int, e int);
19
-
alter table tt1 modify column c varchar(20);
20
-
alter table tt1 drop column c;
16
+
create table cg_tt1(a int, b int, c int, primary key(a)) with column group (all columns, each column);
17
+
create index idx_cg_tt1 on cg_tt1(b);
18
+
create table cg_tt2(d int, e int);
19
+
alter table cg_tt1 modify column c varchar(20);
20
+
alter table cg_tt1 drop column c;
21
21
22
-
let $tt1_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt1', table_id, 1);
23
-
let $tt2_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt2', table_id, 1);
22
+
let $cg_tt1_table_id= query_get_value(select table_id from __all_virtual_table where table_name='cg_tt1', table_id, 1);
23
+
let $cg_tt2_table_id= query_get_value(select table_id from __all_virtual_table where table_name='cg_tt2', table_id, 1);
24
24
25
-
## In tt1 table schema, there exists 4 column_group: __cg_default, __cg_all, __cg_a, __cg_b
26
-
let $tt1_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$tt1_table_id, cg_cnt, 1);
27
-
if ($tt1_cg_cnt != 5)
25
+
## In cg_tt1 table schema, there exists 4 column_group: __cg_default, __cg_all, __cg_a, __cg_b
26
+
let $cg_tt1_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$cg_tt1_table_id, cg_cnt, 1);
27
+
if ($cg_tt1_cg_cnt != 5)
28
28
{
29
-
--echo unexpected column_group count of table tt1, real value is $tt1_cg_cnt
29
+
--echo unexpected column_group count of table cg_tt1, real value is $cg_tt1_cg_cnt
30
30
}
31
-
## tt1 default_type column_group will have none column_id mapping, cuz it has all_type & each_type column_group
32
-
let $tt1_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$tt1_table_id and column_group_name='__co_default', column_group_id, 1);
33
-
let $tt1_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$tt1_table_id and column_group_id=$tt1_default_cg_id, mapping_cnt, 1);
34
-
if ($tt1_column_id_cnt != 0)
31
+
## cg_tt1 default_type column_group will have none column_id mapping, cuz it has all_type & each_type column_group
32
+
let $cg_tt1_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$cg_tt1_table_id and column_group_name='__co_default', column_group_id, 1);
33
+
let $cg_tt1_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$cg_tt1_table_id and column_group_id=$cg_tt1_default_cg_id, mapping_cnt, 1);
34
+
if ($cg_tt1_column_id_cnt != 0)
35
35
{
36
-
--echo unexpected column_group mapping count of table tt1, real value is $tt1_column_id_cnt;
36
+
--echo unexpected column_group mapping count of table cg_tt1, real value is $cg_tt1_column_id_cnt;
37
37
}
38
38
39
-
## In tt2 table schema, there exists only 1 column_group: __co_default
40
-
let $tt2_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$tt2_table_id, cg_cnt, 1);
41
-
if ($tt2_cg_cnt != 1)
39
+
## In cg_tt2 table schema, there exists only 1 column_group: __co_default
40
+
let $cg_tt2_cg_cnt = query_get_value(select count(*) as cg_cnt from __all_column_group where table_id=$cg_tt2_table_id, cg_cnt, 1);
41
+
if ($cg_tt2_cg_cnt != 1)
42
42
{
43
-
--echo unexpected column_group count of table tt2, real value is $tt2_cg_cnt
43
+
--echo unexpected column_group count of table cg_tt2, real value is $cg_tt2_cg_cnt
44
44
}
45
-
## tt2 default_type column_group will have 3 column_id mapping, include d, e, pk_increment
46
-
let $tt2_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$tt2_table_id and column_group_name='__co_default', column_group_id, 1);
47
-
let $tt2_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$tt2_table_id and column_group_id=$tt2_default_cg_id, mapping_cnt, 1);
48
-
if ($tt2_column_id_cnt != 3)
45
+
## cg_tt2 default_type column_group will have 3 column_id mapping, include d, e, pk_increment
46
+
let $cg_tt2_default_cg_id = query_get_value(select column_group_id from __all_column_group where table_id=$cg_tt2_table_id and column_group_name='__co_default', column_group_id, 1);
47
+
let $cg_tt2_column_id_cnt = query_get_value(select count(*) as mapping_cnt from __all_column_group_mapping where table_id=$cg_tt2_table_id and column_group_id=$cg_tt2_default_cg_id, mapping_cnt, 1);
48
+
if ($cg_tt2_column_id_cnt != 3)
49
49
{
50
-
--echo unexpected column_group mapping count of table tt2, real value is $tt2_column_id_cnt
50
+
--echo unexpected column_group mapping count of table cg_tt2, real value is $cg_tt2_column_id_cnt
0 commit comments