]> git.sur5r.net Git - openldap/commitdiff
txn may fail to give us a scan op
authorHoward Chu <hyc@openldap.org>
Fri, 12 Jun 2009 11:57:56 +0000 (11:57 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 12 Jun 2009 11:57:56 +0000 (11:57 +0000)
servers/slapd/back-ndb/search.cpp

index 8a66ffc760f99306ce16bf8ba1b8d6ce2fb916e5..c6668ff5a5f1b881b7716eea60b17e46c71de4e8 100644 (file)
@@ -634,6 +634,10 @@ int ndb_back_search( Operation *op, SlapReply *rs )
        }
 
        scan = txn->getNdbIndexScanOperation( "PRIMARY", DN2ID_TABLE );
+       if ( !scan ) {
+               rs->sr_err = LDAP_OTHER;
+               goto leave;
+       }
        scan->readTuples( NdbOperation::LM_CommittedRead );
        rc = ndb_dn2bound( scan, &rdns );