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

statements:describe: DESC FUNCTION <uda_name> and DESC AGGREGATE <udf_name> crashes Scylla #14360

Closed
Jadw1 opened this issue Jun 22, 2023 · 1 comment · Fixed by #14332
Closed
Assignees
Labels
Milestone

Comments

@Jadw1
Copy link
Contributor

Jadw1 commented Jun 22, 2023

Executing DESC FUNCTION <uda name> or DESC AGGREGATE <udf name> crashes Scylla instead of returning invalid request with message "no such udf/uda found".

@Jadw1 Jadw1 added the type/bug label Jun 22, 2023
@Jadw1 Jadw1 self-assigned this Jun 22, 2023
nyh added a commit that referenced this issue Jun 22, 2023
…g to UDF/UDA' from Michał Jadwiszczak

There was a bug in describe_statement. If executing `DESC FUNCTION  <uda name>` or ` DESC AGGREGATE <udf name>`, Scylla was crashing because the function was found (`functions::find()` searches both UDFs and UDAs) but the function was bad and the pointer wasn't checked after cast.

Added a test for this.

Fixes: #14360

Closes #14332

* github.com:scylladb/scylladb:
  cql-pytest:test_describe: add test for filtering UDF and UDA
  cql3:statements:describe_statement: check pointer to UDF/UDA
margdoc pushed a commit to margdoc/scylla that referenced this issue Jul 4, 2023
While looking for specific UDF/UDA, result of
`functions::functions::find()` needs to be filtered out based on
function's type.

Fixes: scylladb#14360
@DoronArazii DoronArazii added this to the 5.4 milestone Jul 4, 2023
avikivity pushed a commit that referenced this issue Nov 8, 2023
While looking for specific UDF/UDA, result of
`functions::functions::find()` needs to be filtered out based on
function's type.

Fixes: #14360
(cherry picked from commit d498451)
@avikivity
Copy link
Member

Backported to 5.2. 5.4 has it.

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 a pull request may close this issue.

4 participants