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

sql: prevent panic when using UDF as EXECUTE argument #108213

Merged
merged 1 commit into from Aug 7, 2023

Conversation

mgartner
Copy link
Collaborator

@mgartner mgartner commented Aug 4, 2023

Fixes #99008

Release note (bug fix): A bug has been fixed that caused nodes to crash
when attempting to EXECUTE a prepared statement with an argument that
referenced a user-defined function. This bug was present since
user-defined functions were introduced in version 22.2.

@mgartner mgartner requested a review from a team as a code owner August 4, 2023 20:49
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rharding6373 rharding6373 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

@mgartner
Copy link
Collaborator Author

mgartner commented Aug 4, 2023

I created #108215 to track allowing UDFs within EXECUTE arguments.

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @mgartner)


-- commits line 9 at r1:
[nit] introduces -> introduced

Copy link
Collaborator Author

@mgartner mgartner left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @DrewKimball)


-- commits line 9 at r1:

Previously, DrewKimball (Drew Kimball) wrote…

[nit] introduces -> introduced

Done.

@mgartner mgartner force-pushed the 99008-udf-execute-panic branch 2 times, most recently from d236963 to 22ba717 Compare August 7, 2023 12:42
Fixes cockroachdb#99008

Release note (bug fix): A bug has been fixed that caused nodes to crash
when attempting to `EXECUTE` a prepared statement with an argument that
referenced a user-defined function. This bug was present since
user-defined functions were introduced in version 22.2.
@mgartner
Copy link
Collaborator Author

mgartner commented Aug 7, 2023

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 7, 2023

Build succeeded:

@craig craig bot merged commit 8c1ff51 into cockroachdb:master Aug 7, 2023
6 of 7 checks passed
@mgartner mgartner deleted the 99008-udf-execute-panic branch August 8, 2023 12:39
@rafiss
Copy link
Collaborator

rafiss commented Aug 8, 2023

Since #99008 was an error from 22.2, is this going to be backported?

@mgartner
Copy link
Collaborator Author

mgartner commented Aug 9, 2023

Yes, we should backport it. Thanks for calling that out @rafiss!

@mgartner
Copy link
Collaborator Author

mgartner commented Aug 9, 2023

blathers backport 22.2 23.1

@blathers-crl
Copy link

blathers-crl bot commented Aug 9, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 20c43ab to blathers/backport-release-22.2-108213: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.2 failed. See errors above.


error creating merge commit from 20c43ab to blathers/backport-release-23.1-108213: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 23.1 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@mgartner mgartner added backport-22.2.x Flags PRs that need to be backported to 22.2. backport-23.1.x Flags PRs that need to be backported to 23.1 labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-22.2.x Flags PRs that need to be backported to 22.2. backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: v22.2.6: UDFs can't be used as argument for a placeholder
5 participants