rllmodule4.out

来自「derby database source code.good for you.」· OUT 代码 · 共 75 行

OUT
75
字号
ij> -- Test whether the RllRAMAccessmanager is working right (ie. forcing row -- level locking). run resource 'LockTableQuery.subsql';ij> create view lock_table asselect     cast(username as char(8)) as username,    cast(t.type as char(8)) as trantype,    cast(l.type as char(8)) as type,    cast(lockcount as char(3)) as cnt,    mode,    cast(tablename as char(12)) as tabname,    cast(lockname as char(10)) as lockname,    state,    statusfrom     new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() ton l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';0 rows inserted/updated/deletedij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null-- order by--     tabname, type desc, mode, cnt, lockname-- lock table with system catalog locks included.create view full_lock_table asselect     cast(username as char(8)) as username,    cast(t.type as char(8)) as trantype,    cast(l.type as char(8)) as type,    cast(lockcount as char(3)) as cnt,    mode,    cast(tablename as char(12)) as tabname,    cast(lockname as char(10)) as lockname,    state,    statusfrom     new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() ton l.xid = t.xid where l.tableType <> 'S' ;0 rows inserted/updated/deletedij> -- lock table with no join.create view lock_table2 asselect     cast(l.xid as char(8)) as xid,    cast(l.type as char(8)) as type,    cast(lockcount as char(3)) as cnt,    mode,    cast(tablename as char(12)) as tabname,    cast(lockname as char(10)) as lockname,    statefrom     new org.apache.derby.diag.LockTable() l  where l.tableType <> 'S' ;0 rows inserted/updated/deletedij> -- transaction table with no join.create view tran_table asselect     *from     new org.apache.derby.diag.TransactionTable() t ;0 rows inserted/updated/deletedij> autocommit off;ij> create table heap_only (a int);0 rows inserted/updated/deletedij> commit;ij> ---------------------------------------------------------------------------------- Test insert into empty heap, should just get row lock --------------------------------------------------------------------------------insert into heap_only values (1);1 row inserted/updated/deletedij> select * from lock_table order by tabname, type desc, mode, cnt, lockname;USERNAME|TRANTYPE|TYPE    |CNT |MODE|TABNAME     |LOCKNAME  |STATE|STATUS  ---------------------------------------------------------------------------APP     |UserTran|TABLE   |1   |IX  |HEAP_ONLY   |Tablelock |GRANT|ACTIVE  APP     |UserTran|ROW     |1   |X   |HEAP_ONLY   |(1,7)     |GRANT|ACTIVE  ij> commit;ij> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?