From 080586f482ea4809f41ea66e8423efc094eae057 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 27 Apr 2005 17:29:30 +0000 Subject: [PATCH] ITS#3688 don't sort range IDLs! --- servers/slapd/back-bdb/dn2id.c | 2 +- servers/slapd/back-bdb/idl.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index d1730234ff..a2719a5dbc 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -1033,7 +1033,7 @@ hdb_dn2idl( DBTzero(&cx.data); hdb_dn2idl_internal(&cx); - if ( !BDB_IDL_IS_ZERO( ids )) + if ( !BDB_IDL_IS_ZERO( ids ) && !BDB_IDL_IS_RANGE( ids )) bdb_idl_sort( ids ); return cx.rc; diff --git a/servers/slapd/back-bdb/idl.c b/servers/slapd/back-bdb/idl.c index 21259129df..e3a2f26c49 100644 --- a/servers/slapd/back-bdb/idl.c +++ b/servers/slapd/back-bdb/idl.c @@ -1238,7 +1238,7 @@ int bdb_idl_append_one( ID *ids, ID id ) } } ids[0]++; - if ( ids[0] >= BDB_IDL_DB_MAX ) { + if ( ids[0] >= BDB_IDL_UM_MAX ) { ids[0] = NOID; } else { ids[ids[0]] = id; @@ -1325,6 +1325,9 @@ bdb_idl_sort( ID *ids ) int i; ID temp; + if ( BDB_IDL_IS_RANGE( ids )) + return; + for (i = ids[0] / 2; i >= 1; i--) siftDown(ids, i, ids[0]); -- 2.39.5