Product Documentation

c-treeACE V10.0 Release Notes

Previous Topic

Next Topic

Corrected Record Return for Range Retrieval Expressions on Partitioned Files

A SQL query on partitioned files failed to return some records that should match the query criteria. A range retrieval with a filter expression on a variable-length record failed with error CVAL_ERR (598) as the buffer was not large enough to hold the portion of the record that is required to evaluate the filter expression. This is a normal situation, and the logic that called the range retrieval function detects the error and reallocates the buffer such that it is large enough to hold the record. The expectation is that calling the range retrieval function again will return the same record. However, a recent optimization to the partitioned file key buffer did not consider this particular situation, and the next key lookup for the partition whose key was returned on the previous range retrieval (and whose record failed the range check with CVAL_ERR) read the next key from the index instead of using the key from the partition file key buffer. To avoid this missed buffer read, when a CVAL_ERR occurs on a partitioned file that is using the partition key buffer, the partition key buffer state is set for that partition indicating it is necessary to read the key from the partition key buffer.

TOCIndex