3)Data Area
包括14bytes的data header,4bytes/table的table dictionary,2bytes/row的row dictionary,即每增加一条row,row dictionary就多出2bytes用来记载该row,可以通过下面的hsiz反映出来。table dictionary主要用于cluster block中,只不过table block中的table dictionary只有一个table。
data_block_dump,data header at 0x552105c
===============
tsiz: 0x1fa0
==> total data area size
hsiz: 0x14
==> data header size (14+ntabs*4 + nrows*2)
pbl: 0x0552105c
==> pointer to buffer holding the block
bdba: 0x00c0007a
==> block dba / rdba
76543210
flag=--------
==> n=pctfree hit (clusters),f=don't put on freelist, k=flushable cluster keys
ntab=1
==> number of tables (>1 so this is a cluster)
nrow=1
==> number of rows
frre=-1
fsbo=0x14
==> free space begin offset
fseo=0x1f9b
==> free space end offset
avsp=0x1f83
==> available space in the block
tosp=0x1f83
==> total available space when all transactions commit
0xe

ti[0] nrow=1 offs=0
0x12

ri[0] offs=0x1f9b
block_row_dump:
tab 0, row 0, @0x1f9b
==> 3bytes row header
tl: 5 fb: --H-FL-- lb: 0x1 cc: 1
==> lb: 0x1 表示transaction 0x1,cc 表示column的个数
col 0: [ 1] 61
==> column length(1 byte if length<250; otherwise 3 bytes) and values
end_of_block_dump
其中(摘自biti_rainy的关于block中数据的存储和重组的探究):
fb Flag Byte:
K = Cluster Key (Flags may change meaning if this is set to show HASH cluster)
C = Cluster table member
H = Head piece of row
D = Deleted row
F = First data piece
L = Last data piece
P = First column continues from previous piece
N = Last column continues in next piece