[seekdb][DDL] Fix crash on ALTER TABLE ADD for generated timestamp column - #1322
Merged
Conversation
Member
Author
|
The mapping Dima issue is [seekdb 1.4: ALTER TABLE ADD generated column (timestamp expression) causes observer SIGSEGV crash (regression from 1.3 to 1.4)] |
footka
approved these changes
Aug 21, 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.
Task Description
Fix a crash (SIGSEGV) and client error (ERROR 2013) that occurs in seekdb 1.4 when executing
ALTER TABLE ADDto add a generated timestamp column.Solution Description
The regression was introduced by commit
2bf907c560fa(remove oracle), which modified the short-circuit condition for timestamp columns. This inadvertently allowed generated columns to enter the ordinary timestamp default-value handling path, leading to the crash.The fix skips the timestamp default-value resolution specifically for generated columns added via
ALTER TABLE. This preserves the generated expression as the original default value while maintaining correct behavior for ordinary timestamp columns.Passed Regressions
DESCandSHOW CREATE TABLEthatc3is correctly defined as atimestamp VIRTUAL GENERATEDcolumn.ALTER TABLE ADDalso passed.Upgrade Compatibility
No compatibility impact. The change only restores the correct handling for generated columns and does not alter the default value behavior of ordinary timestamp columns.
Other Information
2is unrelated and has been excluded from the changes.Release Note
Fixed a crash that could occur when using
ALTER TABLE ADDto add a generated timestamp column.