-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
为视图增加了bvtcase。对于内容每次执行不同,节点不同时结果不同的视图,只验证存在性。 Approved by: @reusee, @nnsgmsone, @qingxinhome, @zhangxu19830126, @heni02
- Loading branch information
Showing
10 changed files
with
142 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/distributed/cases/pessimistic_transaction/system_view.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
drop database if exists sv_db1; | ||
create database sv_db1; | ||
use sv_db1; | ||
use sv_db1; | ||
create table t1(a int); | ||
begin; | ||
insert into t1 values (1); | ||
select sleep(10); | ||
sleep(10) | ||
0 | ||
select count(*) > 0 from mo_locks() l; | ||
count(*) > 0 | ||
true | ||
select count(*) > 0 from mo_transactions() t join mo_locks() l where t.txn_id = l.txn_id; | ||
count(*) > 0 | ||
true | ||
commit; | ||
drop database if exists sv_db1; |
22 changes: 22 additions & 0 deletions
22
test/distributed/cases/pessimistic_transaction/system_view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--test mo_locks, mo_transactions | ||
|
||
drop database if exists sv_db1; | ||
create database sv_db1; | ||
use sv_db1; | ||
|
||
-- @session:id=1{ | ||
use sv_db1; | ||
create table t1(a int); | ||
begin; | ||
insert into t1 values (1); | ||
select sleep(10); | ||
-- @session} | ||
|
||
select count(*) > 0 from mo_locks() l; | ||
select count(*) > 0 from mo_transactions() t join mo_locks() l where t.txn_id = l.txn_id; | ||
|
||
-- @session:id=1{ | ||
commit; | ||
-- @session} | ||
|
||
drop database if exists sv_db1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
begin; | ||
select sleep(10); | ||
sleep(10) | ||
0 | ||
select count(*) > 0 from mo_sessions() t; | ||
count(*) > 0 | ||
true | ||
select count(*) > 0 from mo_sessions() as t where txn_id != ''; | ||
count(*) > 0 | ||
true | ||
select count(*) > 0 from mo_transactions() t join mo_sessions() s on t.txn_id = s.txn_id; | ||
count(*) > 0 | ||
true | ||
commit; | ||
select count(*) > 0 from mo_cache() c; | ||
count(*) > 0 | ||
true | ||
select count(*) >0 from mo_configurations() t; | ||
count(*) > 0 | ||
true | ||
select count(*) >0 from mo_configurations() t where node_type = 'cn'; | ||
count(*) > 0 | ||
true | ||
select distinct node_type,default_value from mo_configurations() t where name like '%frontend.port'; | ||
node_type default_value | ||
cn 6001 | ||
select count(*) > 0 from mo_configurations() t where internal = 'advanced'; | ||
count(*) > 0 | ||
true | ||
select count(*) > 0 from mo_catalog.mo_variables; | ||
count(*) > 0 | ||
true | ||
select variable_value from mo_catalog.mo_variables where variable_name = 'port' and account_name = 'sys'; | ||
variable_value | ||
6001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--test mo_sessions | ||
|
||
-- @session:id=1{ | ||
begin; | ||
select sleep(10); | ||
-- @session} | ||
|
||
select count(*) > 0 from mo_sessions() t; | ||
select count(*) > 0 from mo_sessions() as t where txn_id != ''; | ||
select count(*) > 0 from mo_transactions() t join mo_sessions() s on t.txn_id = s.txn_id; | ||
|
||
-- @session:id=1{ | ||
commit; | ||
-- @session} | ||
|
||
|
||
-- test mo_cache | ||
|
||
select count(*) > 0 from mo_cache() c; | ||
|
||
-- test mo_configurations | ||
|
||
select count(*) >0 from mo_configurations() t; | ||
select count(*) >0 from mo_configurations() t where node_type = 'cn'; | ||
|
||
select distinct node_type,default_value from mo_configurations() t where name like '%frontend.port'; | ||
select count(*) > 0 from mo_configurations() t where internal = 'advanced'; | ||
|
||
-- test mo_variables | ||
select count(*) > 0 from mo_catalog.mo_variables; | ||
select variable_value from mo_catalog.mo_variables where variable_name = 'port' and account_name = 'sys'; |