Repository navigation
fix(store-oracle): baseline fails with ORA-12899 under MAX_STRING_SIZE=EXTENDED; release 1.1.1 - #142
Merged
Merged
Conversation
…er MAX_STRING_SIZE=EXTENDED v1.1.0 declared threadmill_concurrency_groups.idle_sort as RAW(2000). Oracle sizes NLSSORT for linguistic sorts regardless of the BINARY literal, so under MAX_STRING_SIZE=EXTENDED the expression is RAW(2058) and V1__baseline.sql statement 28 failed with ORA-12899. The virtual column now takes its derived type (RAW(2000) under STANDARD, unchanged from v1.1.0). The runner accepts the v1.1.0 baseline checksum as superseded: a completed v1.1.0 schema stays valid, and a schema stopped at statement 28 resumes with the corrected statement and records the current checksum.
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.
Problem
On an Oracle database with
MAX_STRING_SIZE=EXTENDED, the 1.1.0 baseline migration stops at statement 28 ofV1__baseline.sql:threadmill_concurrency_groups.idle_sortwas declaredRAW(2000). Oracle sizesNLSSORT(...)as if the sort could be linguistic, even with'NLS_SORT = BINARY'in the call. For aVARCHAR2(256 BYTE)key that isRAW(2000)underSTANDARDbutRAW(2058)underEXTENDED. CI runs onlySTANDARD, which is the 23ai Free default, so this never showed up there.Fix
idle_sortnow takes its type from the expression instead of declaring one. UnderSTANDARDthe schema is identical to 1.1.0. The query and index are unchanged.OracleMigrationRunner.SUPERSEDED_CHECKSUMSaccepts the 1.1.0 baseline checksum:migrate()andemitPendingSql().Verification
STANDARD.MAX_STRING_SIZE=EXTENDED(PDBopen upgradeplusutl32k.sql) through-PoracleJdbcUrl. Sessions run withOPTIMIZER_FEATURES_ENABLE='19.1.0'. Before the fix, this setup reproduced the reported ORA-12899 exactly.releasedBaselineDiffersOnlyInTheStatementThatFailsUnderExtendedStringSizereleasedBaselineStoppedAtTheExtendedStringSizeFailureResumesAndRecordsTheCurrentChecksumschemaCompletedByTheReleasedBaselineStillValidatesAndMigratesStill open: a run on a real 19c database. No free 19c image exists. The first real 19c with
EXTENDEDis the deployment that reported this bug.