From 22f6e45f2a2893d4a48f00ddf93e7eaf70371b66 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 12 Jun 2009 11:57:56 +0000 Subject: [PATCH] txn may fail to give us a scan op --- servers/slapd/back-ndb/search.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/back-ndb/search.cpp b/servers/slapd/back-ndb/search.cpp index 8a66ffc760..c6668ff5a5 100644 --- a/servers/slapd/back-ndb/search.cpp +++ b/servers/slapd/back-ndb/search.cpp @@ -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 ); -- 2.39.5