Fix: return NULL for rowid() when cursor's null flag is on

Fixes TPC-H query 13 from returning an incorrect result. In this specific
case, we were returning non-null `IdxRowid` values for the right-hand side
table even when there was no match with the left-hand side table, meaning
the join produced matches even in cases where there shouldn't have been any.

Closes #2794
This commit is contained in:
Jussi Saurio
2025-08-26 09:08:48 +03:00
parent 401d8e5f74
commit e52f807c7d

View File

@@ -4320,6 +4320,9 @@ impl BTreeCursor {
return Ok(IOResult::Done(None));
}
}
if self.get_null_flag() {
return Ok(IOResult::Done(None));
}
if self.has_record.get() {
let page = self.stack.top();
let page = page.get();