Skip to content

feat: report which executemany() batch rows failed #841

Closed

Description

@yeongseon

Problem

When a statement in an executemany() DML batch fails, the server still executes the remaining statements and returns one result per statement, in order. BatchExecutePacket.parse() splits that reply into separate results and errors lists, so executemany() loses which row failed. It raises only the first error, and rowcount stays -1 even though the other rows were applied in the transaction. The #836 probes show this on CUBRID 10.2-11.4: with row 3 of 5 failing, rows 1, 2, 4 and 5 are applied.

Scope

  • Keep the per-statement order in BatchExecutePacket.
  • Expose the failing row's index (and the other failed indexes) on the raised exception, as an additive attribute, on the sync and async cursors.
  • Decide and document what rowcount reports after a partial failure.
  • Add offline tests and an integration test, and update PERFORMANCE.md/API_REFERENCE.md, the Korean copies and CHANGELOG.md.

Non-goals

  • Stopping the batch at the first error. That is server behaviour.

Links

Activity

  1. yeongseon commented on Oct 11, 2026

    @yeongseon
    ContributorAuthor

    Deferred until after the current stabilization release (2026-10-12). #815 admits only fixes for demonstrated regressions in the supported contract, plus the release-candidate work (#833). It does not admit "additional APIs … or opportunistic feature additions". This issue is a new opt-in feature or optional optimization, not a regression fix, so it waits for the next cycle. The evidence from #836 and #822 is already recorded (cubrid-benchmark#22, cubrid-benchmark#23, and the executemany() sections of docs/PERFORMANCE.md from #838 and #843). Nothing is lost by waiting.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions