This commit is contained in:
Pierangelo Masarati 2004-01-17 18:07:43 +00:00
parent c4a8f58a0d
commit 945f3fc9d0
5 changed files with 7 additions and 72 deletions

View 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
};

View 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 )
{

View 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:

View 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 )
{

View 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 */