patch 4.0

This commit is contained in:
wangzelin.wzl
2022-10-24 10:34:53 +08:00
parent 4ad6e00ec3
commit 93a1074b0c
10533 changed files with 2588271 additions and 2299373 deletions

View File

@ -11,6 +11,25 @@ start transaction read only;
start transaction read write;
start transaction with consistent snapshot, read only;
start transaction read write, with consistent snapshot;
start/*hint+start tx hint*/ transaction;
begin;
begin/*hint+begin*/;
begin work;
begin/*hint+begin work*/ work;
commit;
commit/*hint+commit*/;
commit work;
commit/*hint+commit work*/ work;
--sql_mode oracle
commit comment 'comment transaction commit';
commit work comment 'comment txn commit work';
commit/*hint+commit tx hint*/ comment 'comment + hint';
commit/*hint+commit tx work hint*/ work comment 'comment + hint';
--sql_mode mysql
rollback;
rollback/*hint+rollback*/;
rollback work;
rollback/*hint+rollback work*/ work;
alter user 'zdy' account lock;
alter user 'zdy' account unlock;
select d.t1.c1, sum(t1.c2) from d.t1 where d.t1.c1 > 0 and c2 + d.t1.c1 = 100 group by d.t1.c2 order by t.d1.c1 desc limit 0, 1
@ -47,18 +66,10 @@ update d.t1 PARTITION (p2) SET id = 2 WHERE name = 'Jill';
INSERT INTO d.t1 PARTITION (p3, p4) VALUES (24, 'Tim', 'Greene', 3, 1), (26, 'Linda', 'Mills', 2, 1);
REPLACE INTO d.t1 PARTITION (p0) VALUES (20, 'Jan', 'Jones', 3, 2);
SELECT e.id, s.city, d.name FROM e JOIN stores PARTITION (p1) ON e.id=s.id JOIN departments PARTITION (p0) ON e.id=d.id;
alter system switch replica leader zone = 'z1';
alter system switch replica leader server = '127.0.0.1:80';
alter system switch replica leader partition_id = '1%8@3001' server = '127.0.0.1:80';
alter system switch replica leader partition_id '1%8@3001' server '127.0.0.1:80';
alter system drop replica partition_id = '1%8@3001' server = '127.0.0.1:80';
alter system drop replica partition_id = '1%8@3001' server = '127.0.0.1:80' create_timestamp = 1;
alter system drop replica partition_id = '1%8@3001' server = '127.0.0.1:80' zone = 'z1';
alter system drop replica partition_id = '1%8@3001' server = '127.0.0.1:80' create_timestamp = 1 zone = 'z1';
alter system drop replica partition_id '1%8@3001' server '127.0.0.1:80' create_timestamp 1 zone 'z1';
alter system copy replica partition_id = '1%8@3001' source = '127.0.0.1:80' destination = '127.0.0.2:80';
alter system move replica partition_id = '1%8@3001' source = '127.0.0.1:80' destination = '127.0.0.2:80';
alter system move replica partition_id '1%8@3001' source '127.0.0.1:80' destination '127.0.0.2:80';
#alter system switch replica leader zone = 'z1';
#alter system switch replica leader server = '127.0.0.1:80';
#alter system switch replica leader partition_id = '1%8@3001' server = '127.0.0.1:80';
#alter system switch replica leader partition_id '1%8@3001' server '127.0.0.1:80';
alter system report replica;
alter system report replica server = '127.0.0.1:80';
alter system report replica zone = 'z1';
@ -70,9 +81,9 @@ alter system recycle replica zone 'z1';
alter system major freeze;
alter system start merge zone = 'z1';
alter system suspend merge;
alter system suspend merge zone = 'z1';
alter system suspend merge tenant = all;
alter system resume merge;
alter system resume merge zone = 'z1';
alter system resume merge tenant = all;
alter system clear roottable;
alter system clear roottable tenant = 'xxx';
alter system modify zone 'z1' set region 'r1'
@ -146,7 +157,6 @@ select * from t1 cross join t2;
select * from t1 cross join t2 join t3;
select "1234";
select '1234';
create table test(c1 varchar(3) binary) locality="f@zone1, f,l@region1";
create table test(c1 varchar(3) binary charset utf8mb4);
replace into test values(1,2);
replace ignore into test values(1,2);
@ -246,6 +256,8 @@ alter system refresh time_zone_info;
### test for limit ##
#select emp_id, mgr_id from emp where emp_id = 1 start with emp_id = 1 connect by prior c1 = 1 group by c1 having c1 > 1 limit 10;
########################## test for flashback and purge index ###################################
#flashback index t1_index to before drop;
#purge index t1_index;
@ -276,15 +288,16 @@ select unique distinct( max(c1)), c2 from t1;
--error 5001
select unique(*) from t1;
########################## test for returning ###################################
--sql_mode oracle
delete from t1 where c1 = 1 returning c1 + 1, c2 * 2;
update t1 set c1 = 1 where c2 = 2 returning c1, c2 + 3, c3 * c4;
insert into t1 values(1, 2, 3) returning c1, c2, c3;
--error 5001
replace into t1 values(1, 2) returning c1, c2, c3, c4, c5, c6;
############# tablegroup ##################
--sql_mode mysql
create tablegroup tg1 primary_zone = 'z2';
create tablegroup tg1 locality = 'z2';
create tablegroup tg1 locality = 'z2', primary_zone='z2';
alter tablegroup tg1 set primary_zone = "z1:z2";
alter tablegroup tg1 set locality='f@z1,f@z3';
alter tablegroup tg2 add table t1,t2;
alter tablegroup tg1 set locality='f@z1,f@z3', set primary_zone = "z1:z2";
insert into t1 values(X'');
create table t1(`thedate` date NOT NULL COMMENT '日期');
alter system bootstrap REGION 'sys_region' ZONE 'zone1' SERVER '10.101.74.122:41425';