mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 13:40:37 -05:00
ITS#8868 don't convert IDL to range needlessly
in idl_intersection. It may lose precision in a subsequent union.
This commit is contained in:
parent
fb49d486a3
commit
8568716376
2 changed files with 2 additions and 16 deletions
|
|
@ -1085,18 +1085,11 @@ bdb_idl_intersection(
|
|||
}
|
||||
|
||||
/* If a range completely covers the list, the result is
|
||||
* just the list. If idmin to idmax is contiguous, just
|
||||
* turn it into a range.
|
||||
* just the list.
|
||||
*/
|
||||
if ( BDB_IDL_IS_RANGE( b )
|
||||
&& BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_FIRST( a )
|
||||
&& BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_LLAST( a ) ) {
|
||||
if (idmax - idmin + 1 == a[0])
|
||||
{
|
||||
a[0] = NOID;
|
||||
a[1] = idmin;
|
||||
a[2] = idmax;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -711,18 +711,11 @@ mdb_idl_intersection(
|
|||
}
|
||||
|
||||
/* If a range completely covers the list, the result is
|
||||
* just the list. If idmin to idmax is contiguous, just
|
||||
* turn it into a range.
|
||||
* just the list.
|
||||
*/
|
||||
if ( MDB_IDL_IS_RANGE( b )
|
||||
&& MDB_IDL_RANGE_FIRST( b ) <= MDB_IDL_FIRST( a )
|
||||
&& MDB_IDL_RANGE_LAST( b ) >= MDB_IDL_LLAST( a ) ) {
|
||||
if (idmax - idmin + 1 == a[0])
|
||||
{
|
||||
a[0] = NOID;
|
||||
a[1] = idmin;
|
||||
a[2] = idmax;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue