github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/pessimistic_transaction/system_view.sql (about) 1 --test mo_locks, mo_transactions 2 3 drop database if exists sv_db1; 4 create database sv_db1; 5 use sv_db1; 6 7 -- @session:id=1{ 8 use sv_db1; 9 create table t1(a int); 10 begin; 11 insert into t1 values (1); 12 select sleep(10); 13 -- @session} 14 15 select count(*) > 0 from mo_locks() l; 16 select count(*) > 0 from mo_transactions() t join mo_locks() l where t.txn_id = l.txn_id; 17 18 -- @session:id=1{ 19 commit; 20 -- @session} 21 22 drop database if exists sv_db1;