mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
remove unnecessary data from search_info
This commit is contained in:
parent
779d94312f
commit
09f749da96
@ -1102,7 +1102,6 @@ backsql_add( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &p;
|
||||
rs->sr_err = backsql_init_search( &bsi, &pdn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs, slap_anlist_no_attrs,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
||||
|
@ -436,8 +436,6 @@ typedef struct backsql_srch_info {
|
||||
* is used */
|
||||
#define BACKSQL_SCOPE_BASE_LIKE ( LDAP_SCOPE_BASE | 0x1000 )
|
||||
Filter *bsi_filter;
|
||||
int bsi_slimit,
|
||||
bsi_tlimit;
|
||||
time_t bsi_stoptime;
|
||||
|
||||
backsql_entryID *bsi_id_list,
|
||||
|
@ -76,7 +76,6 @@ backsql_bind( Operation *op, SlapReply *rs )
|
||||
|
||||
bsi.bsi_e = &e;
|
||||
rc = backsql_init_search( &bsi, &op->o_req_ndn, LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs, anlist,
|
||||
BACKSQL_ISF_GET_ENTRY );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
|
@ -60,9 +60,7 @@ backsql_compare( Operation *op, SlapReply *rs )
|
||||
* Get the entry
|
||||
*/
|
||||
bsi.bsi_e = &e;
|
||||
rc = backsql_init_search( &bsi, &op->o_req_ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
rc = backsql_init_search( &bsi, &op->o_req_ndn, LDAP_SCOPE_BASE,
|
||||
(time_t)(-1), NULL, dbh, op, rs, anlist,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
switch ( rc ) {
|
||||
|
@ -115,7 +115,6 @@ backsql_delete( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &d;
|
||||
rs->sr_err = backsql_init_search( &bsi, &op->o_req_ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs, slap_anlist_no_attrs,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
switch ( rs->sr_err ) {
|
||||
@ -223,7 +222,6 @@ backsql_delete( Operation *op, SlapReply *rs )
|
||||
e_id = bsi.bsi_base_id;
|
||||
rs->sr_err = backsql_init_search( &bsi, &pdn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs, slap_anlist_no_attrs,
|
||||
BACKSQL_ISF_GET_ENTRY );
|
||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
||||
|
@ -569,8 +569,6 @@ backsql_db_close(
|
||||
int
|
||||
backsql_connection_destroy( Backend *bd, Connection *c )
|
||||
{
|
||||
backsql_info *bi = (backsql_info*)bd->be_private;
|
||||
|
||||
char opbuf[ OPERATION_BUFFER_SIZE ];
|
||||
Operation* op = (Operation *)opbuf;
|
||||
|
||||
|
@ -65,7 +65,6 @@ backsql_modify( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &m;
|
||||
rs->sr_err = backsql_init_search( &bsi, &op->o_req_ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs,
|
||||
slap_anlist_all_attributes,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
|
@ -74,7 +74,6 @@ backsql_modrdn( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &r;
|
||||
rs->sr_err = backsql_init_search( &bsi, &op->o_req_ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs,
|
||||
slap_anlist_all_attributes,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
@ -171,7 +170,6 @@ backsql_modrdn( Operation *op, SlapReply *rs )
|
||||
e_id = bsi.bsi_base_id;
|
||||
rs->sr_err = backsql_init_search( &bsi, &pndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs,
|
||||
slap_anlist_all_attributes,
|
||||
BACKSQL_ISF_GET_ENTRY );
|
||||
@ -226,7 +224,6 @@ backsql_modrdn( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &n;
|
||||
rs->sr_err = backsql_init_search( &bsi, new_npdn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs,
|
||||
slap_anlist_all_attributes,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
@ -455,7 +452,6 @@ backsql_modrdn( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &r;
|
||||
rs->sr_err = backsql_init_search( &bsi, &new_ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs,
|
||||
slap_anlist_all_attributes,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
|
@ -184,7 +184,6 @@ backsql_operational(
|
||||
|
||||
rc = backsql_init_search( &bsi, &rs->sr_entry->e_nname,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL, dbh, op, rs, NULL,
|
||||
BACKSQL_ISF_GET_ID );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
|
@ -164,7 +164,7 @@ int backsql_destroy_schema_map( backsql_info *si );
|
||||
*/
|
||||
|
||||
int backsql_init_search( backsql_srch_info *bsi,
|
||||
struct berval *nbase, int scope, int slimit, int tlimit,
|
||||
struct berval *nbase, int scope,
|
||||
time_t stoptime, Filter *filter, SQLHDBC dbh,
|
||||
Operation *op, SlapReply *rs, AttributeName *attrs,
|
||||
unsigned flags );
|
||||
|
@ -109,8 +109,6 @@ backsql_init_search(
|
||||
backsql_srch_info *bsi,
|
||||
struct berval *nbase,
|
||||
int scope,
|
||||
int slimit,
|
||||
int tlimit,
|
||||
time_t stoptime,
|
||||
Filter *filter,
|
||||
SQLHDBC dbh,
|
||||
@ -127,8 +125,6 @@ backsql_init_search(
|
||||
BER_BVZERO( &bsi->bsi_base_id.eid_dn );
|
||||
BER_BVZERO( &bsi->bsi_base_id.eid_ndn );
|
||||
bsi->bsi_scope = scope;
|
||||
bsi->bsi_slimit = slimit;
|
||||
bsi->bsi_tlimit = tlimit;
|
||||
bsi->bsi_filter = filter;
|
||||
bsi->bsi_dbh = dbh;
|
||||
bsi->bsi_op = op;
|
||||
@ -1827,7 +1823,6 @@ backsql_search( Operation *op, SlapReply *rs )
|
||||
bsi.bsi_e = &base_entry;
|
||||
rs->sr_err = backsql_init_search( &bsi, &op->o_req_ndn,
|
||||
op->ors_scope,
|
||||
op->ors_slimit, op->ors_tlimit,
|
||||
stoptime, op->ors_filter,
|
||||
dbh, op, rs, op->ors_attrs,
|
||||
( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
|
||||
@ -2079,7 +2074,6 @@ backsql_search( Operation *op, SlapReply *rs )
|
||||
rc = backsql_init_search( &bsi2,
|
||||
&e->e_nname,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL,
|
||||
dbh, op, rs, NULL,
|
||||
BACKSQL_ISF_GET_ENTRY );
|
||||
@ -2217,9 +2211,7 @@ next_entry:;
|
||||
}
|
||||
|
||||
next_entry2:;
|
||||
if ( op->ors_slimit != SLAP_NO_LIMIT
|
||||
&& rs->sr_nentries >= op->ors_slimit )
|
||||
{
|
||||
if ( --op->ors_slimit == -1 ) {
|
||||
rs->sr_err = LDAP_SIZELIMIT_EXCEEDED;
|
||||
goto send_results;
|
||||
}
|
||||
@ -2335,7 +2327,6 @@ backsql_entry_get(
|
||||
rc = backsql_init_search( &bsi,
|
||||
ndn,
|
||||
LDAP_SCOPE_BASE,
|
||||
SLAP_NO_LIMIT, SLAP_NO_LIMIT,
|
||||
(time_t)(-1), NULL,
|
||||
dbh, op, &rs, at ? anlist : NULL,
|
||||
BACKSQL_ISF_GET_ENTRY );
|
||||
|
Loading…
Reference in New Issue
Block a user