New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prepared statement "S_2" does not exist in batch executions #449

Merged
merged 2 commits into from Dec 21, 2015

Conversation

Projects
None yet
1 participant
@vlsi
Member

vlsi commented Dec 6, 2015

Register cleanup for statement unprepare early, so it points to the proper statement name.

This might fix #443.

The test causes query executor to re-prepare statement in case types of binds change.
The bug is caused by late creation of PhantomReference->statementName cache entry (as both ParseComplete messages arrive, the Query has changed its statement name)

vlsi added some commits Dec 6, 2015

test: add test for insert batch that changes server-prepared statemen…
…t names

The test causes query executor to re-prepare statement in case types of binds change.
The bug is caused by late creation of PhantomReference->statementName cache entry (as both ParseComplete messages arrive, the Query has changed its statement name)
fix: prepared statement "S_2" does not exist in batch executions
Register cleanup for statement unprepare early, so it points to the proper statement name

@vlsi vlsi force-pushed the Gordiychuk:batch_alternating_types branch from 5ed079f to fa310e0 Dec 21, 2015

vlsi added a commit that referenced this pull request Dec 21, 2015

Merge pull request #449 from Gordiychuk/batch_alternating_types
fix: prepared statement "S_2" does not exist in batch executions

When different datatypes are used for the same bind position, the driver has to re-prepare the query. Current fix just makes sure statement names are recycled properly, so from performance point of view, it is still better to use the same data type for given bind position.

@vlsi vlsi merged commit 1c87d28 into pgjdbc:master Dec 21, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@vlsi vlsi deleted the Gordiychuk:batch_alternating_types branch Dec 22, 2015

@gcandal gcandal referenced this pull request Apr 12, 2017

Merged

Update postgresql to 42.0.0 #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment