ITS#7743 Fix indexed AND filter

Partially revert 47f6aec61e
Was using RANGE_FIRST/RANGE_LAST on an IDL known to *not* be a range.
This commit is contained in:
Howard Chu 2013-11-11 21:01:33 -08:00
parent 36b9c2a339
commit 66bb780b16
4 changed files with 6 additions and 4 deletions

View file

@ -1089,8 +1089,8 @@ bdb_idl_intersection(
* turn it into a range.
*/
if ( BDB_IDL_IS_RANGE( b )
&& BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_RANGE_FIRST( a )
&& BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_RANGE_LAST( a ) ) {
&& 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;

View file

@ -62,6 +62,7 @@
#define BDB_IDL_ALL( bdb, ids ) BDB_IDL_RANGE( ids, 1, ((bdb)->bi_lastid) )
#define BDB_IDL_FIRST( ids ) ( (ids)[1] )
#define BDB_IDL_LLAST( ids ) ( (ids)[(ids)[0]] )
#define BDB_IDL_LAST( ids ) ( BDB_IDL_IS_RANGE(ids) \
? (ids)[2] : (ids)[(ids)[0]] )

View file

@ -715,8 +715,8 @@ mdb_idl_intersection(
* turn it into a range.
*/
if ( MDB_IDL_IS_RANGE( b )
&& MDB_IDL_RANGE_FIRST( b ) <= MDB_IDL_RANGE_FIRST( a )
&& MDB_IDL_RANGE_LAST( b ) >= MDB_IDL_RANGE_LAST( a ) ) {
&& 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;

View file

@ -62,6 +62,7 @@
#define MDB_IDL_ALL( ids ) MDB_IDL_RANGE( ids, 1, NOID )
#define MDB_IDL_FIRST( ids ) ( (ids)[1] )
#define MDB_IDL_LLAST( ids ) ( (ids)[(ids)[0]] )
#define MDB_IDL_LAST( ids ) ( MDB_IDL_IS_RANGE(ids) \
? (ids)[2] : (ids)[(ids)[0]] )