mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 01:34:21 +01:00
adjust evaluation of NULL results in WHEN clauses with SQLite spec
This commit is contained in:
@@ -792,7 +792,8 @@ pub fn translate_expr(
|
||||
lhs: base_reg,
|
||||
rhs: expr_reg,
|
||||
target_pc: next_case_label,
|
||||
flags: CmpInsFlags::default(),
|
||||
// A NULL result is considered untrue when evaluating WHEN terms.
|
||||
flags: CmpInsFlags::default().jump_if_null(),
|
||||
}),
|
||||
// CASE WHEN 0 THEN 0 ELSE 1 becomes ifnot 0 branch to next clause
|
||||
None => program.emit_insn(Insn::IfNot {
|
||||
|
||||
Reference in New Issue
Block a user