From 46a10706f550a1441248a186a2755c572f4d8c24 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Thu, 2 Nov 2000 13:18:45 +0000 Subject: [PATCH] fix _stupid_ thing with toupper -> ldap_pvt_str2upper --- servers/slapd/back-sql/search.c | 8 ++++---- servers/slapd/back-sql/sql-wrap.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index 82db1e1cf8..087d623142 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -132,7 +132,7 @@ int backsql_process_sub_filter(backsql_srch_info *bsi,Filter *f) { if (bsi->bi->upper_func) { - bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,toupper(f->f_sub_initial->bv_val),NULL); + bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,ldap_pvt_str2upper(f->f_sub_initial->bv_val),NULL); } else bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,f->f_sub_initial->bv_val,NULL); @@ -146,7 +146,7 @@ int backsql_process_sub_filter(backsql_srch_info *bsi,Filter *f) //Debug(LDAP_DEBUG_TRACE,"==>backsql_process_sub_filter(): sub_any='%s'\n",f->f_sub_any[i]->bv_val,0,0); if (bsi->bi->upper_func) { - bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,toupper(f->f_sub_any[i]->bv_val),"%",NULL); + bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,ldap_pvt_str2upper(f->f_sub_any[i]->bv_val),"%",NULL); } else bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,f->f_sub_any[i]->bv_val,"%",NULL); @@ -155,7 +155,7 @@ int backsql_process_sub_filter(backsql_srch_info *bsi,Filter *f) if (f->f_sub_final!=NULL) if (bsi->bi->upper_func) { - bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,toupper(f->f_sub_final->bv_val),NULL); + bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,ldap_pvt_str2upper(f->f_sub_final->bv_val),NULL); } else bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,f->f_sub_final->bv_val,NULL); @@ -240,7 +240,7 @@ int backsql_process_filter(backsql_srch_info *bsi,Filter *f) if (bsi->bi->upper_func) bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,"(", bsi->bi->upper_func,"(",at->sel_expr,")='", - toupper(f->f_av_value->bv_val),"')",NULL); + ldap_pvt_str2upper(f->f_av_value->bv_val),"')",NULL); else bsi->flt_where=backsql_strcat(bsi->flt_where,&bsi->fwhere_len,"(",at->sel_expr,"='", f->f_av_value->bv_val,"')",NULL); diff --git a/servers/slapd/back-sql/sql-wrap.c b/servers/slapd/back-sql/sql-wrap.c index c1c1876bb3..dadf803da1 100644 --- a/servers/slapd/back-sql/sql-wrap.c +++ b/servers/slapd/back-sql/sql-wrap.c @@ -66,7 +66,7 @@ RETCODE backsql_Prepare(SQLHDBC dbh,SQLHSTMT *sth,char* query,int timeout) SQLGetInfo(dbh,SQL_DRIVER_NAME,drv_name,30,&len); //Debug(LDAP_DEBUG_TRACE,"_SQLPrepare(): driver name='%s'\n", drv_name,0,0); for (i=0;i<30 && drv_name[i];i++) - drv_name[i]=toupper(drv_name[i]); + drv_name[i]=ldap_pvt_str2upper(drv_name[i]); if (!strncmp(drv_name,"SQLSRV32.DLL",30)) { //stupid default result set in MS SQL Server does not support multiple active statements -- 2.39.5