Repository navigation
Conversation
When pg_regress cannot reuse INITDB_TEMPLATE, initialize with the same normal identifier-case mode used by the Autoconf and Meson templates. Otherwise a quoted contrib_regression name is upper-cased via the Oracle port, and the harness cannot connect to the database it just created. Explicit PG_TEST_INITDB_EXTRA_OPTS remain later in the command line. Related: IvorySQL#2127 Constraint: Match the existing Oracle template defaults without changing server defaults Confidence: high Scope-risk: narrow Tested: Debug/cassert build; test_oat_hooks; case_conversion; clean baseline/fixed no-template replay; no-locale UTF8 smoke Not-tested: Full installcheck-world Known-failure: test_extensions retains an unrelated type-display expectation difference Assisted-by: OpenAI:gpt-5.4 Percentage of AI-generated code: 100%
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: IvorySQL/IvorySQL/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Oracle regression harness now passes ChangesOracle regression initialization
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The separate src/test/regress/ora_pg_regress.c driver still lacks the corresponding -C normal fix.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes Oracle regression setup failures by aligning fresh-cluster initialization with template-based identifier casing.
Changes:
- Adds
-C normalto fresh Oracleinitdbexecution. - Preserves later
PG_TEST_INITDB_EXTRA_OPTSoverrides.
| File | Description |
|---|---|
src/oracle_test/regress/pg_regress.c |
Sets normal identifier-case mode for fresh clusters. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| appendStringInfo(&cmd, | ||
| "\"%s%sinitdb\" -D \"%s/data\" -m oracle --no-clean --no-sync", | ||
| "\"%s%sinitdb\" -D \"%s/data\" -m oracle -C normal --no-clean --no-sync", |
There was a problem hiding this comment.
Verified the two paths separately. ora_pg_regress restores PGPORT to the normal port after probing the Oracle port; the oracle-check driver does not. The unchanged ora_pg_regress passed two fresh-cluster smoke runs with --no-locale --encoding=UTF8 and executed test_oat_hooks plus alter_table (2/2), so the missing-database failure did not reproduce there. The title and description now explicitly scope this PR to oracle-check; the second driver is left unchanged.
|
Thanks for contributing to IvorySQL! |

Fixes #2127.
When the Oracle regression harness creates its own cluster, it runs
initdb -m oraclewithout the identifier-case setting already used by both the Autoconfand Meson initdb templates. In the default interchange mode, creating the quoted
contrib_regressiondatabase through the Oracle port createsCONTRIB_REGRESSION; the following connection to the lowercase name fails beforeany test SQL runs.
Pass
-C normalin the fresh-initdb path to match the template path. This is aone-line harness change, not a change to server defaults. Explicit
PG_TEST_INITDB_EXTRA_OPTSremain later in the command and can still overridethe case mode. The affected paths include an absent template,
NO_LOCALE, andother conditions that force fresh initialization;
ENCODINGalone does notforce that branch in the current code.
This change is scoped to the
oracle-checkdriver undersrc/oracle_test. The separatesrc/test/regress/ora_pg_regress.cdriver used byoracle-pg-checkrestoresPGPORTto the normal port after probing the Oracle port. Its unchanged fresh-initdb path passed independent--no-locale --encoding=UTF8smoke runs and the realtest_oat_hooks/alter_tableSQL tests, so it is not changed here.Verification
Tested from master
63fb0bfe6159fb91b03012eea09f3db7cd46db8cin a real WSL Linuxdebug/cassert build, with original and patched binaries kept separately:
make -C src/oracle_test/modules/test_oat_hooks oracle-check ORA_REGRESS=test_oat_hooks: original fails with missingcontrib_regression;patched passes (1/1).
--no-locale --encoding=UTF8smoke, andcase_conversionpass. The smoke checks the lowercase database name and normal case mode.
failure and patched success, with
INITDB_TEMPLATEandPG_TEST_INITDB_EXTRA_OPTSunset.test_extdependalso passes.test_extensionsexecutes after the fix but retainsan existing expected-output mismatch (
bit varyingversuspg_catalog.varbit).Running the original binary with
PG_TEST_INITDB_EXTRA_OPTS='-C normal'producesbyte-identical extension output to the patched binary, isolating that mismatch
from this change. Full
installcheck-worldand native Windows/Meson builds werenot run. All test server instances were stopped.
PR #2128 references this blocker but changes different module files; this patch
only changes
src/oracle_test/regress/pg_regress.c.Assisted-by: OpenAI:gpt-5.4
Percentage of AI-generated code: 100%
Summary by CodeRabbit