]> git.sur5r.net Git - openldap/commitdiff
remove unnecessary data from search_info
authorPierangelo Masarati <ando@openldap.org>
Sun, 7 Aug 2005 20:43:07 +0000 (20:43 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 7 Aug 2005 20:43:07 +0000 (20:43 +0000)
servers/slapd/back-sql/add.c
servers/slapd/back-sql/back-sql.h
servers/slapd/back-sql/bind.c
servers/slapd/back-sql/compare.c
servers/slapd/back-sql/delete.c
servers/slapd/back-sql/init.c
servers/slapd/back-sql/modify.c
servers/slapd/back-sql/modrdn.c
servers/slapd/back-sql/operational.c
servers/slapd/back-sql/proto-sql.h
servers/slapd/back-sql/search.c

index 03fb03f5bdb1dce06c3724e3910dadc406d4aad1..d8f3842366997d43305fac8e9e5e31077781ba4e 100644 (file)
@@ -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 ) {
index 21c152e2b172f4f6700fbedc3a53ec3329eeaf38..78ca48e791ec7e372d3e00868744009bd4aa3547 100644 (file)
@@ -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,
index 0bc12e5a24c7475f2dfdb53407c06f647258487d..a4284437f7ef497a323507771e1ba7aecf738ff6 100644 (file)
@@ -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 ) {
index 9baf9ff35d66d3cf016a40c0f3c240e12d61d579..bc5d166c3dcba7fc01c1ed005551a0d3e096ec93 100644 (file)
@@ -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 ) {
index d58442787e5148617ad9dc0d0958e6b046a4e42b..1f059c2895c50b2c37e4ee6f19751244d8bbf0e8 100644 (file)
@@ -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 ) {
index a2e6f5948f84548b6ba6650ad9e6a237db37e665..1fd226586a0b84d5c1fac7f2eae17dea863b2f2b 100644 (file)
@@ -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;
 
index 79644cb969b2339883a26129e88d65ee6863a6f5..c9060f98eb4a62bb3cc81526517627dbeb8e7a34 100644 (file)
@@ -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 ) );
index 242a1110c2b4c3680c2a24fea8dbb0b7612480fe..306e557d02fd145492529e130d883861027c9f4f 100644 (file)
@@ -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 ) );
index 2fc2ac0855b40fa6c20cb4cd75973214e1b883ed..6edde629ca61613ace4f92c219973a02bc32759c 100644 (file)
@@ -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 ) {
index 7300b3008aa79981bc7540b1210ad7dc5d78a637..7112812b8645e8a54c812353065767ee97235523 100644 (file)
@@ -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 );
index b883750fb33a9eb62038e52c696ff92f1827edc2..d272ef724fbd760a13b68e91fb48e116a263729a 100644 (file)
@@ -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 );