Skip to content

fix: the wrong logic of constraint checker#540

Closed
ep-12221 wants to merge 425 commits intooceanbase:masterfrom
ep-12221:fix/issue530
Closed

fix: the wrong logic of constraint checker#540
ep-12221 wants to merge 425 commits intooceanbase:masterfrom
ep-12221:fix/issue530

Conversation

@ep-12221
Copy link
Copy Markdown

fix: ALTER TABLE modifying multiple NOT NULL constraints in one statement does not error as expected

Change the condition in
ObAlterTableConstraintChecker::check_can_add_cst_on_multi_column()
from OB_INVALID_ID == *(*iter)->cst_col_begin() to
OB_INVALID_ID != *(*iter)->cst_col_begin().

OB_INVALID_ID means the NOT NULL constraint belongs to a newly added
column whose column id has not been assigned yet. Multi-column ADD
NOT NULL should only be allowed for that case. The old check treated
multi-column MODIFY ... NOT NULL on existing columns as a valid
multi-column ADD path, so ALTER TABLE succeeded instead of reporting
the expected not supported error.

ref: #530

obdev and others added 30 commits December 4, 2025 02:38
Co-authored-by: footka <672528926@qq.com>
…alias names.

Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: helloamateur <magiccheery@163.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: 884244693 <884244693@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
… incr hnsw

Co-authored-by: footka <672528926@qq.com>
Co-authored-by: shadowao <aozeliu@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: LINxiansheng <wangzelin19961202@gmail.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: 884244693 <884244693@qq.com>
…task

Co-authored-by: footka <672528926@qq.com>
…subpartition

Co-authored-by: footka <672528926@qq.com>
…sk del partition emdeded table

Co-authored-by: footka <672528926@qq.com>
…egitimacy]

Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: footka <672528926@qq.com>
obdev and others added 26 commits April 3, 2026 16:25
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: gaopy3 <gao.panyu@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: haitaoy <haitaoy3.14@gmail.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: Garfiled <799044397@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LesinLi <15649865651@163.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: xiebaoma <2402583447@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: xiebaoma <2402583447@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: xiebaoma <2402583447@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: xiebaoma <2402583447@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: Poseidon-fan <18646154381@163.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: Poseidon-fan <18646154381@163.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LesinLi <15649865651@163.com>
Co-authored-by: footka <672528926@qq.com>
…_FORK_START_LOG

Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: fkuner <784819644@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: Garfiled <799044397@qq.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: Garfiled <799044397@qq.com>
…o IDLE

Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: fkuner <784819644@qq.com>
…e to prevent macOS crash

Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LINxiansheng <wangzelin19961202@gmail.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LINxiansheng <wangzelin19961202@gmail.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: Poseidon-fan <18646154381@163.com>
Co-authored-by: footka <672528926@qq.com>
Co-authored-by: haiyuzhou <mock@aaa.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: fkuner <784819644@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LesinLi <15649865651@163.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: Garfiled <799044397@qq.com>
Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LINxiansheng <wangzelin19961202@gmail.com>
…d crash on trigger referencing dropped column

Co-authored-by: wyfanxiao <wyfanxiao@163.com>
Co-authored-by: LINxiansheng <wangzelin19961202@gmail.com>
@ob-robot ob-robot force-pushed the master branch 2 times, most recently from 682722e to 993d61e Compare April 23, 2026 13:51
@hnwyllmm hnwyllmm closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants