mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 02:03:03 +01:00
Fixed CORE-1334 - Joins with NULL RDB$DB_KEY crash the server
This commit is contained in:
parent
bc3fad42f7
commit
3e33eda40b
@ -328,6 +328,10 @@ RecordBitmap** EVL_bitmap(thread_db* tdbb, jrd_nod* node, RecordBitmap* bitmap_a
|
|||||||
impure_inversion* impure = (impure_inversion*) ((SCHAR *) tdbb->tdbb_request + node->nod_impure);
|
impure_inversion* impure = (impure_inversion*) ((SCHAR *) tdbb->tdbb_request + node->nod_impure);
|
||||||
RecordBitmap::reset(impure->inv_bitmap);
|
RecordBitmap::reset(impure->inv_bitmap);
|
||||||
const dsc* desc = EVL_expr(tdbb, node->nod_arg[0]);
|
const dsc* desc = EVL_expr(tdbb, node->nod_arg[0]);
|
||||||
|
|
||||||
|
if (!(tdbb->tdbb_request->req_flags & req_null) &&
|
||||||
|
desc->dsc_length == sizeof(RecordNumber::Packed))
|
||||||
|
{
|
||||||
const USHORT id = (USHORT)(IPTR) node->nod_arg[1];
|
const USHORT id = (USHORT)(IPTR) node->nod_arg[1];
|
||||||
RecordNumber::Packed* numbers = reinterpret_cast<RecordNumber::Packed*>(desc->dsc_address);
|
RecordNumber::Packed* numbers = reinterpret_cast<RecordNumber::Packed*>(desc->dsc_address);
|
||||||
RecordNumber rel_dbkey;
|
RecordNumber rel_dbkey;
|
||||||
@ -337,6 +341,8 @@ RecordBitmap** EVL_bitmap(thread_db* tdbb, jrd_nod* node, RecordBitmap* bitmap_a
|
|||||||
rel_dbkey.decrement();
|
rel_dbkey.decrement();
|
||||||
if (!bitmap_and || bitmap_and->test(rel_dbkey.getValue()))
|
if (!bitmap_and || bitmap_and->test(rel_dbkey.getValue()))
|
||||||
RBM_SET(tdbb->getDefaultPool(), &impure->inv_bitmap, rel_dbkey.getValue());
|
RBM_SET(tdbb->getDefaultPool(), &impure->inv_bitmap, rel_dbkey.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
return &impure->inv_bitmap;
|
return &impure->inv_bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user