----------11(Row Operarion)---------------
Opcode Mnemonic Description
11.2 IRP Insert Single Row
11.3 DRP Delete Single Row
11.4 LKR Lock Row
11.5 URP Update Row/single and mutiple
11.6 ORP Chained Row
11.9 CKI Cluster key index
11.10 SKL Set cluster key pointers
11.11 QMI Insert Multiple Rows
11.12 QMD Delete Multiple Rows
Single/Mutiple Row Select For Update 11.14
For update后, update xxxx 11.15
(三.二)Change vector header补充 -->Change vector header以外的组成部分
CHANGE #2 TYP:0 CLS:16 AFN:1 DBA:0x00400195 OBJ:4294967295 SCN:0x0000.0026de01 SEQ: 1 OP:5.1 --change2
ktudb redo: siz: 256 spc: 4022 flg: 0x0012 seq: 0x0040 rec: 0x11 -->redo size
xid: 0x0000.029.00000040 -->XID事务号
ktubl redo: slt: 41 rci: 0 opc: 11.1 objn: 15 objd: 15 tsn: 0
Undo type: Regular undo Begin trans Last buffer split: No -->常规的undo,change2有undo
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00400195.0040.10
prev ctl max cmt scn: 0x0000.0025b39e prev tx cmt scn: 0x0000.0025b39f
txn start scn: 0xffff.ffffffff logon user: 0 prev brb: 4194706 prev bcl: 0 KDO undo record: -->undo record
KTB Redo
op: 0x04 ver: 0x01 -->op:4(block cleanout),vector 1(ver1的具体操作)
op: L itl: xid: 0x0000.03c.00000040 uba: 0x00400195.0040.10
flg: C--- lkc: 0 scn: 0x0000.0026de02
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040006a hdba: 0x00400069
itli: 1 ispac: 0 maxfr: 4863 -->ITL
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 191 -->slot号
ncol: 17 nnew: 12 size: 0
1.Transactions /*以change#2为例*/
1)The first DML statement in a session creates a transaction -->一个session创建一个事务系统会给它分配一个undo段
*.Allocates an undo segment
*.Creates a 5.2 change to update transaction table in undo segment header -->系统会在该undo段头事务表更新该事务的记录
示例
CHANGE #1 TYP:0 CLS:25 AFN:3 DBA:0x00c0012e SCN:0x0000.0ac86ebf SEQ: 1 OP:5.4 -->5.4 means end transaction
ktucm redo: slt: 0x0010 sqn: 0x0000475a srt: 0 sta: 9 flg: 0x0
说明:
*.A commit (or rollback) ends the transaction -->commit或者rollback结束事务
*.A 5.4 change is created for a commit -->当commit则会产生5.4 change
*.Rollbacks apply all undo for the transaction followed by a commit -->当事务commit后回滚所有的该事务的撤消信息,即与下个该obj对应的事务划清界限
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15072844/viewspace-627470/
,如需转载,请注明出处,否则将追究法律责任。