]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
Multi-threaded slapindex
[openldap] / servers / slapd / backend.c
index f6f868a30d52d0b061e65f49992eb8b010aba4c6..77dcf4a422b7eb562738fb6e564b50a26b8820da 100644 (file)
@@ -614,7 +614,13 @@ select_backend(
                                                continue;
                                        }
                                } else {
-                                       b2 = be;
+                                       /* If any parts of the tree are glued, use the first
+                                        * match regardless of manageDSAit. Otherwise use the
+                                        * last match.
+                                        */
+                                       if( !( SLAP_DBFLAGS( be ) & ( SLAP_DBFLAG_GLUE_INSTANCE |
+                                               SLAP_DBFLAG_GLUE_SUBORDINATE )))
+                                               b2 = be;
                                }
                                return b2;
                        }