A range operation on a partitioned file involving criteria that match non-contiguous keys omitted some records that match the range criteria. In the case involved, the range consists of two non-contiguous ranges. First, a key is read and this key is checked against the second range criterion, which it fails. The range is then promoted to the first range and in this case should find the same key and the key passes the first range criterion. However, when the partition key buffer is enabled (default), the key buffer should be ignored in this situation and the key search performed. To ensure the key search is performed, c-treeACE now resets the partition key buffer state so that the key search is performed when switching between range limits in a non-contiguous range.