[FEAT MERGE] column store ddl

Co-authored-by: simonjoylet <simonjoylet@gmail.com>
Co-authored-by: Monk-Liu <1152761042@qq.com>
Co-authored-by: renju96 <fcbrenju@163.com>
This commit is contained in:
Charles0429
2024-02-07 23:09:01 +00:00
committed by ob-robot
parent fd359dc4a4
commit 1c20161f72
354 changed files with 29599 additions and 7741 deletions

View File

@ -674,6 +674,9 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | __all_virtual_checkpoint | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_clone_job | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_clone_job_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_mapping | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_mapping_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_compaction_diagnose_info | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_compaction_suggestion | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_core_all_table | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
@ -2024,6 +2027,9 @@ select * from information_schema.tables where table_schema in ('oceanbase', 'mys
| def | oceanbase | __all_virtual_checkpoint | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_clone_job | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_clone_job_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_mapping | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_column_group_mapping_history | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_compaction_diagnose_info | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_compaction_suggestion | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |
| def | oceanbase | __all_virtual_core_all_table | SYSTEM TABLE | MEMORY | NULL | DYNAMIC | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | utf8mb4_general_ci | NULL | NULL | |

View File

@ -1,6 +1,6 @@
alter system enable_table_without_all_cg = false;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group (all columns, each column);
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group (all columns, each column);
select count(*) from t1;
count(*)
150
@ -330,8 +330,8 @@ count(*) count(c1) min(c1) max(c1) sum(c1) count(c2) min(c2) max(c2)
drop table t1,t2;
alter system enable_table_without_all_cg = true;
alter system flush plan cache;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group (all columns, each column);
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group (all columns, each column);
select count(*) from t1;
count(*)
150

View File

@ -1,5 +1,5 @@
drop table if exists ct1;
create table ct1(c1 int, c2 int) with column group for all columns, each column;
create table ct1(c1 int, c2 int) with column group (all columns, each column);
alter system major freeze;
select * from ct1 where c1 < 1;
c1 c2

View File

@ -1,6 +1,6 @@
drop table if exists ct1;
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
alter system minor freeze;
alter system major freeze;
select c1, c2, c3, length(c4) from ct1 where c1 < 1;

View File

@ -1,6 +1,6 @@
drop table if exists ct1;
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
alter system minor freeze;
alter system major freeze;
update ct1 set c3 = 0 where c1 = 0;
@ -449,7 +449,7 @@ drop table ct1;
alter system enable_table_without_all_cg = false;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
alter system minor freeze;
alter system major freeze;
update ct1 set c3 = 0 where c1 = 0;

View File

@ -1,9 +1,7 @@
create table tt1(a int, b int, c int, primary key(a)) with column group for all columns, each column;
create table tt1(a int, b int, c int, primary key(a)) with column group (all columns, each column);
create index idx_tt1 on tt1(b);
create table tt2(d int, e int);
alter table tt1 drop column c;
ERROR 0A000: drop column with column store table not supported
alter table tt1 modify column c varchar(20);
ERROR 0A000: alter column with column store table not supported
alter table tt1 drop column c;
drop table tt1;
drop table tt2;

View File

@ -1,6 +1,6 @@
create table t1(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a)) with column group (all columns, each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group (all columns, each column);
create table t3(a int, b varchar(3048), primary key (a)) with column group (all columns, each column);
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);

View File

@ -1,6 +1,6 @@
create table t1(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t1(a int, b varchar(3048), primary key (a)) with column group (each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group (each column);
create table t3(a int, b varchar(3048), primary key (a)) with column group (each column);
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);

View File

@ -10,8 +10,8 @@ drop table if exists t1,t2;
--enable_query_log
alter system enable_table_without_all_cg = false;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group (all columns, each column);
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group (all columns, each column);
sleep 10;
@ -189,8 +189,8 @@ drop table t1,t2;
alter system enable_table_without_all_cg = true;
alter system flush plan cache;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group for all columns, each column;
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) with column group (all columns, each column);
create table t2(pk int, c1 int, c2 int unsigned, c3 varchar(100)) block_size=2048 with column group (all columns, each column);
sleep 10;

View File

@ -14,7 +14,7 @@ connection conn1;
--disable_warnings
drop table if exists ct1;
--enable_warnings
create table ct1(c1 int, c2 int) with column group for all columns, each column;
create table ct1(c1 int, c2 int) with column group (all columns, each column);
--disable_query_log
--let $count = 0

View File

@ -15,7 +15,7 @@ set @@recyclebin = off;
drop table if exists ct1;
--enable_warnings
set session ob_trx_timeout=100000000000;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
--disable_query_log
--let $count = 0

View File

@ -20,8 +20,7 @@ set @@recyclebin = off;
drop table if exists ct1;
--enable_warnings
set session ob_trx_timeout=100000000000;
# create table without all column group
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
--disable_query_log
--let $count = 0
@ -123,8 +122,7 @@ alter system enable_table_without_all_cg = false;
alter system set _rowsets_enabled = true;
alter system flush plan cache;
# create table with all column group
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group for all columns, each column;
create table ct1(c1 int primary key, c2 int, c3 number, c4 varchar(60000), c5 varchar(60000)) ROW_FORMAT = redundant COMPRESSION = 'none' with column group (all columns, each column);
--disable_query_log
--let $count = 0

View File

@ -13,20 +13,18 @@ drop table if exists tt2;
--enable_warnings
--enable_query_log
create table tt1(a int, b int, c int, primary key(a)) with column group for all columns, each column;
create table tt1(a int, b int, c int, primary key(a)) with column group (all columns, each column);
create index idx_tt1 on tt1(b);
create table tt2(d int, e int);
--error 1235
alter table tt1 drop column c;
--error 1235
alter table tt1 modify column c varchar(20);
alter table tt1 drop column c;
let $tt1_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt1', table_id, 1);
let $tt2_table_id= query_get_value(select table_id from __all_virtual_table where table_name='tt2', table_id, 1);
## In tt1 table schema, there exists 5 column_group: __co_default, __co_all, __cg_a, __cg_b, __cg_c
## In tt1 table schema, there exists 4 column_group: __cg_default, __cg_all, __cg_a, __cg_b
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);
if ($tt1_cg_cnt != 5)
if ($tt1_cg_cnt != 4)
{
--echo unexpected column_group count of table tt1, real value is $tt1_cg_cnt
}

View File

@ -12,9 +12,9 @@ drop table if exists t3;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a)) with column group (all columns, each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group (all columns, each column);
create table t3(a int, b varchar(3048), primary key (a)) with column group (all columns, each column);
sleep 10;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);

View File

@ -12,9 +12,9 @@ drop table if exists t3;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group for each column;
create table t3(a int, b varchar(3048), primary key (a)) with column group for each column;
create table t1(a int, b varchar(3048), primary key (a)) with column group (each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) with column group (each column);
create table t3(a int, b varchar(3048), primary key (a)) with column group (each column);
sleep 10;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);

View File

@ -12,9 +12,9 @@ drop table if exists ct1,ct2,ct3;
--enable_warnings
--disable_query_log
create table ct1 (c1 int, c2 int) with column group for all columns, each column;
create table ct2(c1 int, c2 varchar(100), c3 varchar(1000)) block_size=2048 with column group for all columns, each column;
create table ct3(c1 int primary key, c2 int, c3 int, c4 int) partition by hash(c1) partitions 2 with column group for all columns, each column;
create table ct1 (c1 int, c2 int) with column group (all columns, each column);
create table ct2(c1 int, c2 varchar(100), c3 varchar(1000)) block_size=2048 with column group (all columns, each column);
create table ct3(c1 int primary key, c2 int, c3 int, c4 int) partition by hash(c1) partitions 2 with column group (all columns, each column);
--let $count = 0
while($count < 1000)
{

View File

@ -35,7 +35,7 @@ alter system set _rowsets_enabled = true tenant = 'mysql';
alter system flush plan cache global;
delete from t3 where a = 2;
insert into t3 (a, b, c, d) values(31, 1, "a", repeat('a', 1000));
create table t4(a int) row_format = compressed with column group for all columns, each column;
create table t4(a int) row_format = compressed with column group (all columns, each column);
insert into t4 values (-1), (0);
explain select /*+ LEADING(t4,t3) USE_NL(t3,t4) NO_USE_NL_MATERIALIZATION(t3) */ t3.a from t4,t3 where (t3.a >= t4.a + 31 and t3.a <= t4.a + 35) or (t3.a >= t4.a + 1 and t3.a <= t4.a + 5) order by t3.a;
Query Plan

View File

@ -1,6 +1,6 @@
create table t1(a int, b varchar(3048), primary key (a)) row_format = compressed with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) row_format = compressed with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) row_format = compressed with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a)) row_format = compressed with column group (all columns, each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) row_format = compressed with column group (all columns, each column);
create table t3(a int, b varchar(3048), primary key (a)) row_format = compressed with column group (all columns, each column);
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
insert into t3 values(1, 1);

View File

@ -222,7 +222,7 @@ Outputs & filters:
access([t3.__pk_increment]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t3.__pk_increment]), range(MIN ; MAX)always true
create table t4 (a bigint auto_increment primary key, b bigint, c char(100), d varchar(100), e bigint not null) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t4 (a bigint auto_increment primary key, b bigint, c char(100), d varchar(100), e bigint not null) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t4 (a, b, c, d, e) values(1, 9, "a", repeat('a', 10),1);
insert into t4 (a, b, c, d, e) values(2, 2, "ab", repeat("ab", 10),1);
insert into t4 (a, b, c, d, e) values(3, 5, "abcd", repeat("ab", 10),1);

View File

@ -1,4 +1,4 @@
create table t1(a int, b varchar(3048), primary key (a), c int) row_format = compressed with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) row_format = compressed with column group (all columns, each column);
select count(*) from t1;
count(*)
150

View File

@ -15,7 +15,7 @@ set ob_trx_timeout=1000000000;
drop table if exists t1;
--enable_warnings
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t1 (b, c, d) values(1, "a", repeat('a', 1000));
insert into t1 (b, c, d) values(2, "ab", repeat("ab", 500));
insert into t1 (b, c, d) values(3, "ab ", repeat("ab", 500));

View File

@ -19,7 +19,7 @@ drop table if exists t3;
drop table if exists t4;
--enable_warnings
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t1 (b, c, d) values(1, "a", repeat('a', 1000));
insert into t1 (b, c, d) values(2, "ab", repeat("ab", 500));
insert into t1 (b, c, d) values(3, "ab ", repeat("ab", 500));
@ -37,11 +37,11 @@ while($loop > 0)
select count(1) from t1;
# bug
create table t2 (a smallint(94) NOT NULL, b smallint(40) DEFAULT NULL, primary key(a)) row_format = compressed with column group for all columns, each column;
create table t2 (a smallint(94) NOT NULL, b smallint(40) DEFAULT NULL, primary key(a)) row_format = compressed with column group (all columns, each column);
insert into t2 values (39,845), (280,748), (520,693), (531,834), (548,17), (575,81), (576,711), (597,756), (680,594);
insert into t2 values (751,576), (763,941), (797,906), (806,792), (841,320), (888,10), (952,398), (974,321);
create table t3 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t3 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t3 (b, c, d) values(1, "a", repeat('a', 1000));
insert into t3 (b, c, d) values(2, "ab", repeat("ab", 500));
insert into t3 (b, c, d) values(3, "ab ", repeat("ab", 500));
@ -83,7 +83,7 @@ alter system flush plan cache global;
connection default;
delete from t3 where a = 2;
insert into t3 (a, b, c, d) values(31, 1, "a", repeat('a', 1000));
create table t4(a int) row_format = compressed with column group for all columns, each column;
create table t4(a int) row_format = compressed with column group (all columns, each column);
insert into t4 values (-1), (0);
explain select /*+ LEADING(t4,t3) USE_NL(t3,t4) NO_USE_NL_MATERIALIZATION(t3) */ t3.a from t4,t3 where (t3.a >= t4.a + 31 and t3.a <= t4.a + 35) or (t3.a >= t4.a + 1 and t3.a <= t4.a + 5) order by t3.a;
select /*+ LEADING(t4,t3) USE_NL(t3,t4) NO_USE_NL_MATERIALIZATION(t3) */ t3.a from t4,t3 where (t3.a >= t4.a + 31 and t3.a <= t4.a + 35) or (t3.a >= t4.a + 1 and t3.a <= t4.a + 5) order by t3.a;

View File

@ -14,7 +14,7 @@ set ob_trx_timeout=1000000000;
drop table if exists t_black;
--enable_warnings
create table t_black(a int primary key, b int, c date, d text, e text, f text) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t_black(a int primary key, b int, c date, d text, e text, f text) row_format = compressed block_size = 2048 with column group (all columns, each column);
--let $count = 1
while($count < 101)
{

View File

@ -10,9 +10,9 @@ drop table if exists t3;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a)) row_format = compressed with column group for all columns, each column;
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) row_format = compressed with column group for all columns, each column;
create table t3(a int, b varchar(3048), primary key (a)) row_format = compressed with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a)) row_format = compressed with column group (all columns, each column);
create table t2(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int) row_format = compressed with column group (all columns, each column);
create table t3(a int, b varchar(3048), primary key (a)) row_format = compressed with column group (all columns, each column);
sleep 10;
insert into t1 values(1, 1);
insert into t2 values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);

View File

@ -57,7 +57,7 @@ explain select a,count(b) from t3 group by a;
explain select count(*) from t3 for update;
# minor&major freeze
create table t4 (a bigint auto_increment primary key, b bigint, c char(100), d varchar(100), e bigint not null) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t4 (a bigint auto_increment primary key, b bigint, c char(100), d varchar(100), e bigint not null) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t4 (a, b, c, d, e) values(1, 9, "a", repeat('a', 10),1);
insert into t4 (a, b, c, d, e) values(2, 2, "ab", repeat("ab", 10),1);
insert into t4 (a, b, c, d, e) values(3, 5, "abcd", repeat("ab", 10),1);

View File

@ -8,7 +8,7 @@ drop table if exists t1;
--enable_warnings
--enable_query_log
create table t1(a int, b varchar(3048), primary key (a), c int) row_format = compressed with column group for all columns, each column;
create table t1(a int, b varchar(3048), primary key (a), c int) row_format = compressed with column group (all columns, each column);
sleep 10;

View File

@ -15,7 +15,7 @@ set ob_trx_timeout=1000000000;
drop table if exists t1;
--enable_warnings
create table t1 (a int auto_increment primary key, b smallint(6), c varchar(10)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t1 (a int auto_increment primary key, b smallint(6), c varchar(10)) row_format = compressed block_size = 2048 with column group (all columns, each column);
--let $loop=1000
while($loop > 0)
{

View File

@ -15,7 +15,7 @@ set ob_trx_timeout=1000000000;
drop table if exists t1;
--enable_warnings
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t1 (a int auto_increment primary key, b bigint, c char(100), d varchar(1000)) row_format = compressed block_size = 2048 with column group (all columns, each column);
insert into t1 (b, c, d) values(1, "a", repeat('a', 1000));
insert into t1 (b, c, d) values(2, "ab", repeat("ab", 500));
insert into t1 (b, c, d) values(3, "ab ", repeat("ab", 500));

View File

@ -14,7 +14,7 @@ connection default;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 (c1 int auto_increment primary key, c2 bigint, c3 varchar(100)) row_format = compressed block_size = 2048 with column group for all columns, each column;
create table t1 (c1 int auto_increment primary key, c2 bigint, c3 varchar(100)) row_format = compressed block_size = 2048 with column group (all columns, each column);
--let $loop=10
while($loop > 0)

View File

@ -94,6 +94,7 @@ enable_rpc_authentication_bypass
enable_sql_audit
enable_sql_extension
enable_sql_operator_dump
enable_store_compression
enable_syslog_recycle
enable_syslog_wf
enable_sys_table_ddl

View File

@ -4485,6 +4485,47 @@ comment longtext YES
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_import_table_task_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_mapping;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_mapping;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_history;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
is_deleted bigint(20) NO NULL
column_group_name varchar(256) YES
column_group_type bigint(20) YES NULL
block_size bigint(20) YES NULL
compressor_type bigint(20) YES NULL
row_store_type bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_mapping_history;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
is_deleted bigint(20) NO NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_mapping_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_clone_job;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL

View File

@ -8846,6 +8846,47 @@ comment longtext YES
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_import_table_task_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_mapping;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_mapping;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_history;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
is_deleted bigint(20) NO NULL
column_group_name varchar(256) YES
column_group_type bigint(20) YES NULL
block_size bigint(20) YES NULL
compressor_type bigint(20) YES NULL
row_store_type bigint(20) YES NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_column_group_mapping_history;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL
table_id bigint(20) NO PRI NULL
column_group_id bigint(20) NO PRI NULL
column_id bigint(20) NO PRI NULL
schema_version bigint(20) NO PRI NULL
gmt_create timestamp(6) NO NULL
gmt_modified timestamp(6) NO NULL
is_deleted bigint(20) NO NULL
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_column_group_mapping_history;
IF(count(*) >= 0, 1, 0)
1
desc oceanbase.__all_virtual_clone_job;
Field Type Null Key Default Extra
tenant_id bigint(20) NO PRI NULL

View File

@ -696,6 +696,9 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
12425 __all_virtual_import_table_job_history 2 201001 1
12426 __all_virtual_import_table_task 2 201001 1
12427 __all_virtual_import_table_task_history 2 201001 1
12430 __all_virtual_column_group_mapping 2 201001 1
12431 __all_virtual_column_group_history 2 201001 1
12432 __all_virtual_column_group_mapping_history 2 201001 1
12435 __all_virtual_clone_job 2 201001 1
12436 __all_virtual_clone_job_history 2 201001 1
12447 __all_virtual_aux_stat 2 201001 1