Here we mainly verify the storage of null values of the number and varchar2 data types. First, we will introduce the rowpiece structure. A structure diagram of the official document is usually referenced, not including (clustertable and chainrow) A rowpiece includes rowheader and columndata.
Here we mainly verify the storage of null values of the number and varchar2 data types. First, we will introduce the structure of the row piece reference a structure diagram of the official document, A rowpiece, excluding cluster table and chain row, includes row header and column data.
Here we mainly verify the storage of null values of the number and varchar2 data types.
First, we will introduce the structure of row piece.
Reference A structure chart of the official document
Generally, a rowpiece excluding (cluster table and chain row) includes row header and column data.
Other cases will be released in future studies.
BBED> dump/v
File:/u01/apps/Oracle/oradata/david/users01.dbf (4)
Block: 531 Offsets: 8173to 8191 Dba: 0x01000213
-------------------------------------------------------
3c020302 c1020353 59530444 55414c01 l <...... SYS. DUAL.
06fbd4 l. commandid
<16 bytes per line>
For example, the first three bytes of A rowpiece, 3c0203, indicate
1-byte flag
1-byte lb (itl slot)
1-byte columncount
In this example
3c = flags = 00111100 = -- HDFL -- = header + delete + first + last
02 = lb itl slot 0x02
03 = column count
The column value information includes:
Column Length, column value
For example, 02c102
2 bytes
C102 indicates the specific value
Dump information can be translated using UTL_RAW.CAST_TO_xxxx (thanks to itpubIori809)
Verify now
First, the environment is 11.1.0.6 linux x64
- Dex @ FAKE>DescTs
- NameNull? Type
- ---------------------------------------------------------------------------------------------------------------------
- ID NUMBER
- NAMEVARCHAR2 (20)
- COUNT NUMBER
-
-
- Dex @ FAKE>SelectT .*,
- 2 dbms_rowid.rowid_relative_fno (t. rowid)As"FNO #",
- 3 dbms_rowid.rowid_block_number (t. rowid)As"BLK #",
- 4 dbms_rowid.rowid_row_number (t. rowid)As"ROW #"
- 5FromDex. ts t
- 6;
-
-
- IDNAMECount fno # BLK # ROW #
- ----------------------------------------------------------------------
- 1 dd 4 31 0
- 2 2 4 31 1
- 2 3 4 31 2
- 4 4 31 3
Table creation statement: dex @ FAKE> create table ts (id number, name varchar2 (20), count number );
Because the long column type is not used in the table, the column order in the table is the same as that in the column declaration in the table.
BBED> set dba 4, 31
DBA 0x000001f (16777247)
BBED> map
File:/u01/apps/Oracle/oradata/fake/users01.dbf (4)
Block: 31 Dba: 0x000001f
------------------------------------------------------------
KTB Data Block (Table/Cluster)
Struct kcbh, 20 bytes @ 0
Struct ktbbh, 72 bytes @ 20
Struct kdbh, 14 bytes @ 100
Struct kdbt [1], 4 bytes @ 114
Sb2 kdbr [3] @ 118
Ub1 freespace [8036] @ 124
Ub1 rowdata [28] @ 8160
Ub4 tailchk @ 8188