Uncovering the Risks of Variable Assignment in ORDER BY Clauses
This article explains why using variable assignment expressions inside ORDER BY clauses can trigger severe OCP alarms, analyzes the underlying source code in OceanBase, demonstrates unpredictable query results with examples, and offers safer alternative patterns.
