You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
equivalence Db2: a -- comment with an apostrophe in a case seed.sql is loaded differently by ggsqlrun, the Java reset and CLP #4610
era:2Era CICS/MVS-ESA, COBOL II/85: RESP, SQL, DPL (~1988-96) (era_tags.py)scope:coreBlocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial
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.
era:2Era CICS/MVS-ESA, COBOL II/85: RESP, SQL, DPL (~1988-96) (era_tags.py)scope:coreBlocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial
Activity