Skip to content
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

release-19.2: sql: allow DEALLOCATE ALL with a prepared statement #52992

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Aug 18, 2020

Backport 1/1 commits from #52940.

/cc @cockroachdb/release


PR #48842 added logic to exhaust portals after executing them. This had
issues when the portal being executed closes itself, which happens when
using DEALLOCATE in a prepared statement. Now we check if the portal
still exists before exhausting it.

There is no release note as this fixes a bug that only exists in
unreleased versions.

fixes #52915
fixes #52220
fixes #52880
fixes #52506

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@celiala celiala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing! Noting one diff from #52940 below - if that's expected/okay then LGTM!

{"Type":"CommandComplete","CommandTag":"DISCARD"}
{"Type":"ReadyForQuery","TxStatus":"I"}

# Send a simple query in the middle of extended protocol, which is apparently
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already existed in master, but is added in this PR -- I'm guessing that's intended/okay?

@rafiss rafiss force-pushed the backport19.2-52940 branch from 071c153 to fecee65 Compare August 18, 2020 20:14
@celiala celiala mentioned this pull request Aug 18, 2020
25 tasks
@rafiss rafiss force-pushed the backport19.2-52940 branch from fecee65 to 744fde5 Compare August 18, 2020 22:54
Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the other pgjdbc test case out of the file since it's unrelated. We probably also need to do a small test rewrite:

    --- FAIL: TestPGTest/pgjdbc (0.02s)
        datadriven.go:53:
            testdata/pgtest/pgjdbc:43: ReadyForQuery
            expected:
            {"Type":"ParameterStatus","Name":"application_name","Value":""}
            {"Type":"ParameterStatus","Name":"TimeZone","Value":"UTC"}
            {"Type":"CommandComplete","CommandTag":"DISCARD"}
            {"Type":"ReadyForQuery","TxStatus":"I"}

            found:
            {"Type":"CommandComplete","CommandTag":"DISCARD"}
            {"Type":"ReadyForQuery","TxStatus":"I"}

I think this is expected (#42376)

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @asubiotto, @rafiss, and @yuzefovich)

Copy link
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching those! fixed

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @yuzefovich)

PR cockroachdb#48842 added logic to exhaust portals after executing them. This had
issues when the portal being executed closes itself, which happens when
using DEALLOCATE in a prepared statement. Now we check if the portal
still exists before exhausting it.

There is no release note as this fixes a bug that only exists in
unreleased versions.

Release note: None
@rafiss rafiss force-pushed the backport19.2-52940 branch from 744fde5 to 076572c Compare August 19, 2020 14:07
Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss and @yuzefovich)

@rafiss rafiss merged commit 5a1eb98 into cockroachdb:release-19.2 Aug 19, 2020
@rafiss rafiss deleted the backport19.2-52940 branch August 19, 2020 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants