Changeset: 28ad57777b5a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/28ad57777b5a
Modified Files:
        clients/odbc/driver/ODBCDbc.h
        clients/odbc/driver/SQLConnect.c
Branch: Aug2024
Log Message:

Last four parameters of MNDBConnect are now unused


diffs (88 lines):

diff --git a/clients/odbc/driver/ODBCDbc.h b/clients/odbc/driver/ODBCDbc.h
--- a/clients/odbc/driver/ODBCDbc.h
+++ b/clients/odbc/driver/ODBCDbc.h
@@ -144,8 +144,7 @@ int ODBCGetKeyAttr(const SQLCHAR **conn,
 SQLRETURN MNDBAllocStmt(ODBCDbc *dbc, SQLHANDLE *pnOutputHandle);
 SQLRETURN MNDBConnect(ODBCDbc *dbc, const SQLCHAR *szDataSource, SQLSMALLINT 
nDataSourceLength,
                        const SQLCHAR *szUID, SQLSMALLINT nUIDLength,
-                       const SQLCHAR *szPWD, SQLSMALLINT nPWDLength,
-                       const char *host, int port, const char *dbname, int 
mapToLongVarchar);
+                       const SQLCHAR *szPWD, SQLSMALLINT nPWDLength);
 SQLRETURN MNDBGetConnectAttr(ODBCDbc *dbc, SQLINTEGER Attribute, SQLPOINTER 
ValuePtr, SQLINTEGER BufferLength, SQLINTEGER *StringLength);
 SQLRETURN MNDBSetConnectAttr(ODBCDbc *dbc, SQLINTEGER Attribute, SQLPOINTER 
ValuePtr, SQLINTEGER StringLength);
 
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -311,17 +311,14 @@ end:
 
 
 SQLRETURN
+
 MNDBConnect(ODBCDbc *dbc,
            const SQLCHAR *ServerName,
            SQLSMALLINT NameLength1,
            const SQLCHAR *UserName,
            SQLSMALLINT NameLength2,
            const SQLCHAR *Authentication,
-           SQLSMALLINT NameLength3,
-           const char *host,
-           int port,
-           const char *dbname,
-           int mapToLongVarchar)
+           SQLSMALLINT NameLength3)
 {
        // These will be passed to addDbcError if you 'goto failure'.
        // If unset, 'goto failure' will assume an allocation error.
@@ -402,30 +399,12 @@ MNDBConnect(ODBCDbc *dbc,
                        goto failure;
        }
 
-       if (host != NULL) {
-               error_explanation = msetting_set_string(settings, MP_HOST, 
host);
-               if (error_explanation != NULL)
-                       goto failure;
-       }
-
        mapiport_env = getenv("MAPIPORT");
-       if (port > 0)
-               error_explanation = msetting_set_long(settings, MP_PORT, port);
-       else if (mapiport_env != NULL)
+       if (mapiport_env != NULL)
                error_explanation = msetting_parse(settings, MP_PORT, 
mapiport_env);
        if (error_explanation != NULL)
                goto failure;
 
-       if (dbname != NULL) {
-               error_explanation = msetting_set_string(settings, MP_DATABASE, 
dbname);
-               if (error_explanation != NULL)
-                       goto failure;
-       }
-
-       error_explanation = msetting_set_long(settings, MP_MAPTOLONGVARCHAR, 
mapToLongVarchar);
-       if (error_explanation)
-               goto failure;
-
 #ifdef ODBCDEBUG
        {
                free(scratch);
@@ -545,8 +524,7 @@ SQLConnect(SQLHDBC ConnectionHandle,
        return MNDBConnect((ODBCDbc *) ConnectionHandle,
                           ServerName, NameLength1,
                           UserName, NameLength2,
-                          Authentication, NameLength3,
-                          NULL, 0, NULL, 0);
+                          Authentication, NameLength3);
 }
 
 SQLRETURN SQL_API
@@ -596,8 +574,7 @@ SQLConnectW(SQLHDBC ConnectionHandle,
        rc = MNDBConnect(dbc,
                         ds, SQL_NTS,
                         uid, SQL_NTS,
-                        pwd, SQL_NTS,
-                        NULL, 0, NULL, 0);
+                        pwd, SQL_NTS);
 
       bailout:
        if (ds)
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to