Nonstop Database, HiRDB Version 9 UAP Development Guide
If a key value for an index exceeds 10 bytes, the system creates a different locked resource for the index key value, according to the value that was specified for the pd_key_resource_type operand in the system definitions. For details about the pd_key_resource_type operand of the system definitions, see the HiRDB Version 9 System Definition manual.
Figure 3-14 shows how a key value locked resource is created when TYPE1 is specified in the pd_key_resource_type operand. Figure 3-15 shows how a key value locked resource is created when TYPE2 is specified.
Figure 3-14 Creation of a key value locked resource when pd_key_resource_type=TYPE1 is used
If the key value length exceeds 10 bytes, the system removes the first two bytes and the last byte of the key value, extracts the remaining data in 7-byte units, and applies exclusive-OR while bit-shifting the units. The bit shift operation logically shifts each unit by the remainder after the extraction count is divided by eight and applies exclusive-OR for 8-byte data to the units.
The system stores the exclusive-OR result (intermediate result) to an 8-byte area and applies exclusive-OR to the first (X) and last (Y) bytes of the intermediate result to create a 7-byte data value (result).
The system combines the 7-byte data (result) with the first two bytes and the last byte that were removed initially and sets the resulting 10-byte data value as the locked resource of the index key value.
Figure 3-15 Creation of a key value locked resource when pd_key_source_type=TYPE2 is used
If the key value length exceeds 10 bytes, the system removes the first two bytes and the last byte of the key value, extracts the remaining data in 7-byte units, and applies exclusive-OR. The system combines the exclusive-OR result with the first two bytes and the last byte that were removed initially, and sets the resulting 10-byte data value as the locked resource of the index key value.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.