Skip to content

Commit af5ee0f

Browse files
committed
Fix #8805 - Regression in 6.x related to 53b218f
1 parent df73f92 commit af5ee0f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/dsql/ExprNodes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,13 @@ TriState LookupValueList::find(thread_db* tdbb, Request* request, const ValueExp
290290
const auto sortedList = init(tdbb, request);
291291
fb_assert(sortedList && sortedList->hasData());
292292

293-
if (!sortedList->front().desc)
294-
return TriState::empty();
293+
const bool hasNull = !sortedList->front().desc;
294+
const bool found = sortedList->exist(SortValueItem(value, desc));
295295

296-
return TriState(sortedList->exist(SortValueItem(value, desc)));
296+
if (found)
297+
return TriState(true);
298+
299+
return hasNull ? TriState::empty() : TriState(false);
297300
}
298301

299302
//--------------------

0 commit comments

Comments
 (0)