mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
cleanup
This commit is contained in:
parent
c4a8f58a0d
commit
945f3fc9d0
@ -58,11 +58,11 @@ sql_back_initialize(
|
|||||||
#if 0 /* needs updating */
|
#if 0 /* needs updating */
|
||||||
#ifdef LDAP_CONTROL_NOOP
|
#ifdef LDAP_CONTROL_NOOP
|
||||||
LDAP_CONTROL_NOOP,
|
LDAP_CONTROL_NOOP,
|
||||||
#endif
|
#endif /* LDAP_CONTROL_NOOP */
|
||||||
#endif
|
#endif
|
||||||
#ifdef LDAP_CONTROL_VALUESRETURNFILTER
|
#ifdef LDAP_CONTROL_VALUESRETURNFILTER
|
||||||
LDAP_CONTROL_VALUESRETURNFILTER,
|
LDAP_CONTROL_VALUESRETURNFILTER,
|
||||||
#endif
|
#endif /* LDAP_CONTROL_VALUESRETURNFILTER */
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -633,45 +633,6 @@ backsql_supad2at( backsql_oc_map_rec *objclass, AttributeDescription *supad,
|
|||||||
return 0;
|
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
|
static void
|
||||||
backsql_free_attr( void *v_at )
|
backsql_free_attr( void *v_at )
|
||||||
{
|
{
|
||||||
|
@ -639,7 +639,7 @@ equality_match:;
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
backsql_strfcat( &bsi->bsi_flt_where, "cblbl",
|
backsql_strfcat( &bsi->bsi_flt_where, "cblbl",
|
||||||
'(',
|
'(', /* ) */
|
||||||
&at->bam_sel_expr,
|
&at->bam_sel_expr,
|
||||||
(ber_len_t)sizeof( "='" ) - 1, "='",
|
(ber_len_t)sizeof( "='" ) - 1, "='",
|
||||||
filter_value,
|
filter_value,
|
||||||
@ -670,7 +670,7 @@ equality_match:;
|
|||||||
|
|
||||||
if ( at->bam_sel_expr_u.bv_val ) {
|
if ( at->bam_sel_expr_u.bv_val ) {
|
||||||
backsql_strfcat( &bsi->bsi_flt_where, "cbbc",
|
backsql_strfcat( &bsi->bsi_flt_where, "cbbc",
|
||||||
'(',
|
'(', /* ) */
|
||||||
&at->bam_sel_expr_u,
|
&at->bam_sel_expr_u,
|
||||||
&ordering,
|
&ordering,
|
||||||
'\'' );
|
'\'' );
|
||||||
@ -1428,16 +1428,15 @@ backsql_search( Operation *op, SlapReply *rs )
|
|||||||
#if 0 /* noop is masked SLAP_CTRL_UPDATE */
|
#if 0 /* noop is masked SLAP_CTRL_UPDATE */
|
||||||
if ( op->o_noop ) {
|
if ( op->o_noop ) {
|
||||||
sres = 0;
|
sres = 0;
|
||||||
} else {
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
rs->sr_attrs = op->oq_search.rs_attrs;
|
rs->sr_attrs = op->oq_search.rs_attrs;
|
||||||
rs->sr_entry = entry;
|
rs->sr_entry = entry;
|
||||||
sres = send_search_entry( op, rs );
|
sres = send_search_entry( op, rs );
|
||||||
rs->sr_entry = NULL;
|
rs->sr_entry = NULL;
|
||||||
rs->sr_attrs = NULL;
|
rs->sr_attrs = NULL;
|
||||||
#if 0
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
switch ( sres ) {
|
switch ( sres ) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -126,31 +126,6 @@ backsql_Prepare( SQLHDBC dbh, SQLHSTMT *sth, char *query, int timeout )
|
|||||||
return SQLPrepare( *sth, query, SQL_NTS );
|
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
|
RETCODE
|
||||||
backsql_BindRowAsStrings( SQLHSTMT sth, BACKSQL_ROW_NTS *row )
|
backsql_BindRowAsStrings( SQLHSTMT sth, BACKSQL_ROW_NTS *row )
|
||||||
{
|
{
|
||||||
|
@ -321,7 +321,7 @@ backsql_get_table_spec( char **p )
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
backsql_strcat( &res, " AS ", s, NULL );
|
backsql_strcat( &res, " AS ", s, NULL );
|
||||||
/* oracle doesn't understand AS :( */
|
/* oracle doesn't understand AS :( and other RDBMSes don't need it */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* table alias */
|
/* table alias */
|
||||||
|
Loading…
Reference in New Issue
Block a user