[CBRD-26547] Support OOS in Covered Index (midxkey)#6844
Open
vimkim wants to merge 1 commit intoCUBRID:feat/oosfrom
Open
[CBRD-26547] Support OOS in Covered Index (midxkey)#6844vimkim wants to merge 1 commit intoCUBRID:feat/oosfrom
vimkim wants to merge 1 commit intoCUBRID:feat/oosfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates covered-index (midxkey) value extraction so that out-of-slot stored (OOS) variable-length values are correctly materialized into the generated midxkey, enabling covered index scans to return the correct column values instead of empty strings.
Changes:
- Refactors
heap_midxkey_get_valueto useheap_attrvalue_point_fixed/variableinstead of manual fixed/var offset access. - Enables OOS materialization for variable attributes by propagating the OOS read path and ensuring the read DB_VALUE is safe after freeing the OOS buffer.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hgryoo
approved these changes
Feb 12, 2026
hyahong
approved these changes
Feb 12, 2026
H2SU
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
http://jira.cubrid.org/browse/CBRD-26547
Purpose
현재 covered index (midxkey) 에서는 OOS 값을 읽어올 수 없다.
midxkey 생성 시 OOS OID 대신 OOS 값을 넣도록 개선한다.
Implementation
heap_midxkey_get_value 함수는 현재 (예찬님이 리팩토링한) heap_attrvalue_point_variable() 함수로 되어 있지 않고 직접
OR_FIXED_ATTRIBUTES_OFFSET_BY_OBJ () 매크로를 통해 접근하는 방식으로 raw하게 구현되어 있다.
이를 heap_attrvalue_point_variable() 함수를 사용해 현대적인 방법으로 개선한다.
OOS에서는 heap_attrvalue_point_value() 함수 내부에서 IS_OOS를 값으로 바꿔주므로 이를 통해 midxkey 또한 OOS 값을 담도록 개선할 수 있다.
Remarks
How to Reproduce
disable string compression.
AS-IS
select id, vc from tbl where id > 0;
쿼리의 경우, vc 가 ''으로 빈 string 값이 나온다.
TO-BE
값이 정상적으로 잘 나온다.