sql: SELECT FOR UPDATE not able to be optimized away #114282
Labels
A-read-committed
Related to the introduction of Read Committed
A-sql-optimizer
SQL logical planning and optimizations.
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
P-3
Issues/test failures with no fix SLA
T-sql-queries
SQL Queries Team
This exact combination of SELECT FOR UPDATE, EXISTS, and NULL parameter using a prepared statement is able to be optimized to a constant
false
in 22.2.16 but becomes a full table scan in 23.1.11:Here's v22.2.16:
Here's v23.1.11:
In v23.2.0-alpha.6 it's better if we use the new SELECT FOR UPDATE behavior (
optimizer_use_lock_op_for_serializable
):Jira issue: CRDB-33431
The text was updated successfully, but these errors were encountered: