Skip to content

equivalence Db2: a -- comment with an apostrophe in a case seed.sql is loaded differently by ggsqlrun, the Java reset and CLP #4610

Closed

Description

@squid-protocol

Part of #4270. Found while writing seed rows for genapp-lgipdb01 (branch det/4270-eibtaskn-stated).

Finding

The two sides of a Db2 equivalence case load an @case/seed.sql differently when it has a -- comment line that contains an apostrophe (-- ... GenApp's own endowment INSERTs ...):

  • Db2's CLP (equivalence_db2._clp) runs every INSERT. A replay of the same reset.sql gave no errors.
  • The COBOL side's ggsqlrun -f /work/reset.sql loaded the first INSERT after the comment (POLICY 101) and lost the INSERTs that followed (ENDOWMENT 101, POLICY/HOUSE 102, POLICY/MOTOR 103).
  • The Java side (EquivalenceRunTest's reset) loaded none of them.

As a result, every scenario differed on DB2 GENASA1.POLICY (record 11 "missing: java"), and the new scenarios found no rows. The apostrophe probably opens a string literal in a splitter that tracks quotes but not -- comments.

Why it matters

It showed up here as a difference, so nothing was wrongly proven. But a seed whose comment hides INSERTs the same way on both sides would prove against rows the author never meant. The fix is one rule for both loaders: strip -- comments outside literals before splitting on ; (or refuse a seed with comments by name). Add a test with a quoted comment.

Worked around in the PR by dropping the comment from the seed file.

🤖 Generated with Claude Code

Activity

  1. added
    scope:core
    era:2
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    era:2scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions