Skip to content
Snippets Groups Projects
Commit 66bb780b authored by Howard Chu's avatar Howard Chu
Browse files

ITS#7743 Fix indexed AND filter

Partially revert 47f6aec6
Was using RANGE_FIRST/RANGE_LAST on an IDL known to *not* be a range.
parent 36b9c2a3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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]] )
......
......@@ -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;
......
......@@ -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]] )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment