]> git.sur5r.net Git - openldap/commitdiff
fix _stupid_ thing with toupper -> ldap_pvt_str2upper
authorDmitry Kovalev <mit@openldap.org>
Thu, 2 Nov 2000 13:18:45 +0000 (13:18 +0000)
committerDmitry Kovalev <mit@openldap.org>
Thu, 2 Nov 2000 13:18:45 +0000 (13:18 +0000)
servers/slapd/back-sql/search.c
servers/slapd/back-sql/sql-wrap.c

index 82db1e1cf8a30cbb374b7c2db1670f6476833cd3..087d623142a8a426268faa98592c9c3e086aa366 100644 (file)
@@ -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);
index c1c1876bb35742d236eadabce6eedd6235e65557..dadf803da1b3038c952a14a25d709abb3bb77218 100644 (file)
@@ -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