]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Sat, 17 Jan 2004 18:07:43 +0000 (18:07 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 17 Jan 2004 18:07:43 +0000 (18:07 +0000)
servers/slapd/back-sql/init.c
servers/slapd/back-sql/schema-map.c
servers/slapd/back-sql/search.c
servers/slapd/back-sql/sql-wrap.c
servers/slapd/back-sql/util.c

index 686cc2c2d488a48dd765e56c92698dabc8fe81d7..840ef0989adae36be6c9db70786d341cdb4d6f3b 100644 (file)
@@ -58,11 +58,11 @@ sql_back_initialize(
 #if 0 /* needs updating */
 #ifdef LDAP_CONTROL_NOOP
                LDAP_CONTROL_NOOP,
-#endif
+#endif /* LDAP_CONTROL_NOOP */
 #endif
 #ifdef LDAP_CONTROL_VALUESRETURNFILTER
                LDAP_CONTROL_VALUESRETURNFILTER,
-#endif
+#endif /* LDAP_CONTROL_VALUESRETURNFILTER */
                NULL
        };
 
index 106d73e4ffd8be4d744e4fa9ae0228042e095775..3f75bb84ad5f4a8fccd3ed26822a4a80ada6a80a 100644 (file)
@@ -633,45 +633,6 @@ backsql_supad2at( backsql_oc_map_rec *objclass, AttributeDescription *supad,
        return 0;
 }
 
-
-#if 0
-/*
- * Deprecated
- */
-backsql_at_map_rec *
-backsql_name2at( backsql_oc_map_rec* objclass, struct berval *attr )
-{
-       backsql_at_map_rec      tmp, *res;
-       const char              *text = NULL;
-#ifdef BACKSQL_TRACE
-       Debug( LDAP_DEBUG_TRACE, "==>backsql_name2at(): "
-               "searching for attribute '%s' for objectclass '%s'\n",
-               attr, BACKSQL_OC_NAME( objclass ), 0 );
-#endif /* BACKSQL_TRACE */
-
-       if ( slap_bv2ad( attr, &tmp.bam_ad, &text ) != LDAP_SUCCESS ) {
-               return NULL;
-       }
-
-       res = (backsql_at_map_rec *)avl_find( objclass->bom_attrs, &tmp,
-                       backsql_cmp_attr );
-
-#ifdef BACKSQL_TRACE
-       if ( res != NULL ) {
-               Debug( LDAP_DEBUG_TRACE, "<==backsql_name2at(): "
-                       "found name='%s', sel_expr='%s'\n",
-                       res->bam_name, res->bam_sel_expr.bv_val, 0 );
-       } else {
-               Debug( LDAP_DEBUG_TRACE, "<==backsql_name2at(): "
-                       "not found\n", 0, 0, 0 );
-       }
-#endif /* BACKSQL_TRACE */
-
-       return res;
-}
-#endif
-
 static void
 backsql_free_attr( void *v_at )
 {
index 342b79becf4d9a75af1bb0a7e1de90ddf4d43d32..546b9dd321847bee208472e28a5d31bdd9b70705 100644 (file)
@@ -639,7 +639,7 @@ equality_match:;
 
                } else {
                        backsql_strfcat( &bsi->bsi_flt_where, "cblbl",
-                                       '(',
+                                       '(', /* ) */
                                        &at->bam_sel_expr,
                                        (ber_len_t)sizeof( "='" ) - 1, "='",
                                        filter_value,
@@ -670,7 +670,7 @@ equality_match:;
 
                        if ( at->bam_sel_expr_u.bv_val ) {
                                backsql_strfcat( &bsi->bsi_flt_where, "cbbc",
-                                               '(',
+                                               '(', /* ) */
                                                &at->bam_sel_expr_u, 
                                                &ordering,
                                                '\'' );
@@ -1428,16 +1428,15 @@ backsql_search( Operation *op, SlapReply *rs )
 #if 0  /* noop is masked SLAP_CTRL_UPDATE */
                        if ( op->o_noop ) {
                                sres = 0;
-                       } else {
+                       } else
 #endif
+                       {
                                rs->sr_attrs = op->oq_search.rs_attrs;
                                rs->sr_entry = entry;
                                sres = send_search_entry( op, rs );
                                rs->sr_entry = NULL;
                                rs->sr_attrs = NULL;
-#if 0
                        }
-#endif
 
                        switch ( sres ) {
                        case 0:
index 414aeafc54e47ea95c1abfc6593afd196c8ed46a..07ec0e5b77740f06439a3470d92742564a6bdc17 100644 (file)
@@ -126,31 +126,6 @@ backsql_Prepare( SQLHDBC dbh, SQLHSTMT *sth, char *query, int timeout )
        return SQLPrepare( *sth, query, SQL_NTS );
 }
 
-#if 0
-/*
- * Turned into macros --- see sql-wrap.h
- */
-RETCODE
-backsql_BindParamStr( SQLHSTMT sth, int par_ind, char *str, int maxlen )
-{
-       RETCODE         rc;
-
-       rc = SQLBindParameter( sth, (SQLUSMALLINT)par_ind, SQL_PARAM_INPUT,
-                       SQL_C_CHAR, SQL_VARCHAR,
-                       (SQLUINTEGER)maxlen, 0, (SQLPOINTER)str,
-                       (SQLUINTEGER)maxlen, NULL );
-       return rc;
-}
-
-RETCODE
-backsql_BindParamID( SQLHSTMT sth, int par_ind, unsigned long *id )
-{
-       return SQLBindParameter( sth, (SQLUSMALLINT)par_ind,
-                       SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
-                       0, 0, (SQLPOINTER)id, 0, (SQLINTEGER*)NULL );
-}
-#endif
-
 RETCODE
 backsql_BindRowAsStrings( SQLHSTMT sth, BACKSQL_ROW_NTS *row )
 {
index cebd7a006f9a14e1fe70e6427ed7f3d7ee44bdc6..02bd21d6392cb6a236208c3ad1f174965f10d30b 100644 (file)
@@ -321,7 +321,7 @@ backsql_get_table_spec( char **p )
 
 #if 0
        backsql_strcat( &res, " AS ", s, NULL );
-       /* oracle doesn't understand AS :( */
+       /* oracle doesn't understand AS :( and other RDBMSes don't need it */
 #endif
 
        /* table alias */