Skip to content

Fix stale bindings leaking between execute_many() parameter sets#554

Merged
SRombauts merged 2 commits into
masterfrom
fix-executemany-clearbindings
Jun 30, 2026
Merged

Fix stale bindings leaking between execute_many() parameter sets#554
SRombauts merged 2 commits into
masterfrom
fix-executemany-clearbindings

Conversation

@SRombauts

Copy link
Copy Markdown
Owner

execute_many() reset the statement between parameter sets but never cleared the bindings, so a set that bound fewer values than the previous one silently reused the leftover values (silent data corruption). Call clearBindings() after reset() so each parameter set starts clean.

Adds a regression test covering decreasing arity across parameter sets.

@coveralls

coveralls commented Jun 29, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 99.711%. first build — fix-executemany-clearbindings into master

SRombauts added a commit that referenced this pull request Jun 30, 2026
SRombauts added a commit that referenced this pull request Jun 30, 2026
SRombauts added a commit that referenced this pull request Jun 30, 2026
reset_bind_exec() called reset() then re-bound the next tuple, but
reset() leaves previous bindings in place. A parameter set that bound
fewer values than the previous one silently reused the leftover values.
Call clearBindings() after reset() so every set starts clean.

Add a regression test exercising decreasing arity across parameter sets.
@SRombauts SRombauts force-pushed the fix-executemany-clearbindings branch from 71e8b3f to e656cb9 Compare June 30, 2026 13:53
@SRombauts SRombauts self-assigned this Jun 30, 2026
@SRombauts SRombauts added the bug label Jun 30, 2026
@SRombauts SRombauts merged commit b2d9b02 into master Jun 30, 2026
36 of 38 checks passed
@SRombauts SRombauts deleted the fix-executemany-clearbindings branch June 30, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants