sql: assigning placeholders overwrites UDF body statements #147186
Labels
branch-master
Failures and bugs on the master branch.
branch-release-23.2
Used to mark GA and release blockers, technical advisories, and bugs for 23.2
branch-release-24.1
Used to mark GA and release blockers, technical advisories, and bugs for 24.1
branch-release-24.3
Used to mark GA and release blockers, technical advisories, and bugs for 24.3
branch-release-25.1
branch-release-25.2
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-support
Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
T-sql-queries
SQL Queries Team
Uh oh!
There was an error while loading. Please reload this page.
With #141596, we now copy the body statements of a routine unconditionally when assigning placeholders. However, we missed that the slice containing the body statements also needs to be copied, or else the stable-folding that takes place during this copy step will be visible to all queries that hit the plan cache. Here's an example where this is a problem:
In this example, the second row should have
200
for the value ofb
, not100
.Jira issue: CRDB-50913
The text was updated successfully, but these errors were encountered: