Pull Request已成功合入, 合并人@opengauss_bot
(感谢 xiahanzhi 的贡献)Welcome To openGauss Community
Hey @x00510761 , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.
Contact Guide
If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zjh_hw .


这里的 ScanKeyEntryInitialize 可能不应只放在else分支。
当索引键为 int8、查询键为 int4 时,if分支仅设置cmp_proc = F_BTINT84CMP,随后绕过本行,导致inskey->scankeys[i] 未初始化。后续 B-tree 比较使用sk_attno 调用 index_getattr(),会触发断言失败。附本地复现用例:
CREATE TABLE smp_int84_min (k int8 NOT NULL);
INSERT INTO smp_int84_min VALUES (1);
CREATE INDEX smp_int84_min_k_idx ON smp_int84_min(k);
ANALYZE smp_int84_min;
SET query_dop = 3;
SET enable_force_smp = on;
SET enable_seqscan = off;
SET enable_indexscan = on;
SET enable_indexonlyscan = off;
SET enable_bitmapscan = off;
EXPLAIN (COSTS OFF)
SELECT count(*) FROM smp_int84_min WHERE k >= 1;
SELECT count(*) FROM smp_int84_min WHERE k >= 1;


【标题】(请简要描述下实现的内容)
实现索引扫描SMP
【实现内容】:
实现索引扫描SMP
【根因分析】:
【实现方案】:
二阶段扫描,第一阶段划分范围,第二阶段按划分范围扫描
【关联需求或issue】:
【开发自验报告】:
索引SMP资料
不涉及
不涉及
不涉及
不涉及
不涉及
不涉及
【其他说明】:

覆盖率