Changeset: fa4d36dd1317 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/fa4d36dd1317 Added Files: clients/odbc/ChangeLog.Oct2020 Modified Files: clients/odbc/ChangeLog clients/odbc/driver/SQLConnect.c Branch: Oct2020 Log Message:
Get logfile information from odbc.ini file as alternative to environment variable. diffs (66 lines): diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog --- a/clients/odbc/ChangeLog +++ b/clients/odbc/ChangeLog @@ -1,13 +1,3 @@ # ChangeLog file for odbc # This file is updated with Maddlog -* Thu Mar 25 2021 Sjoerd Mullender <[email protected]> -- The ODBC driver now only passes on information about HUGEINT columns - as HUGEINT when the application has indicated interest by querying - about the SQL_HUGEINT extension type using the SQLGetTypeInfo - function or by specifying the type in a call to SQLSetDescField. - Otherwise the driver silently translates the HUGEINT type to BIGINT. - This means that most application will see BIGINT columns when the - server produced a HUGEINT column and only give an error if the value - in the HUGEINT column didn't fit into a BIGINT. - diff --git a/clients/odbc/ChangeLog.Oct2020 b/clients/odbc/ChangeLog.Oct2020 new file mode 100644 --- /dev/null +++ b/clients/odbc/ChangeLog.Oct2020 @@ -0,0 +1,20 @@ +# ChangeLog file for odbc +# This file is updated with Maddlog + +* Wed Mar 31 2021 Sjoerd Mullender <[email protected]> +- When connecting using a DSN (Data Source Name), information about the + data source is retrieved from the ODBC.INI file. Now we also get the + location of the LOGFILE from this file. The logfile can be used to + log all calls to the MonetDB ODBC driver to a file which can be used + for debugging. + +* Thu Mar 25 2021 Sjoerd Mullender <[email protected]> +- The ODBC driver now only passes on information about HUGEINT columns + as HUGEINT when the application has indicated interest by querying + about the SQL_HUGEINT extension type using the SQLGetTypeInfo + function or by specifying the type in a call to SQLSetDescField. + Otherwise the driver silently translates the HUGEINT type to BIGINT. + This means that most application will see BIGINT columns when the + server produced a HUGEINT column and only give an error if the value + in the HUGEINT column didn't fit into a BIGINT. + 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 @@ -141,6 +141,20 @@ MNDBConnect(ODBCDbc *dbc, } } +#ifdef ODBCDEBUG + if ((ODBCdebug == NULL || *ODBCdebug == 0) && dsn && *dsn) { + char logfile[2048]; + n = SQLGetPrivateProfileString(dsn, "logfile", "", + logfile, sizeof(logfile), + "odbc.ini"); + if (n > 0) { + if (ODBCdebug) + free((void *) ODBCdebug); /* discard const */ + ODBCdebug = strdup(logfile); + } + } +#endif + if (dsn && *dsn) n = SQLGetPrivateProfileString(dsn, "uid", "monetdb", uid, sizeof(uid), "odbc.ini"); _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
