[unixODBC-dev] Bug report and patch for SQLGetConnectAttr.c

Matt Grimm matt.t.grimm+unixodbc at gmail.com
Mon Nov 4 21:06:28 GMT 2013


Hello,

I found a bug in SQLGetConnectAttr.c that makes it impossible to tell if
tracing is disabled. When tracing is explicitly disabled with
SQLSetConnectAttr(), SQLGetConnectAttr() still returns SQL_OPT_TRACE_ON.

I've attached a patch to the 2.3.2 release that fixes the issue for me. If
the change is acceptable, would you also consider backporting it to 2.3.1?

Thanks,
m.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20131104/6c7a261d/attachment.html>
-------------- next part --------------
diff -Naur a/DriverManager/SQLGetConnectAttr.c b/DriverManager/SQLGetConnectAttr.c
--- a/DriverManager/SQLGetConnectAttr.c	2013-04-15 09:41:25.000000000 -0600
+++ b/DriverManager/SQLGetConnectAttr.c	2013-11-04 13:37:31.647027000 -0700
@@ -204,7 +204,7 @@
             }
             else
             {
-                *((SQLINTEGER*)value) = SQL_OPT_TRACE_ON;
+                *((SQLINTEGER*)value) = SQL_OPT_TRACE_OFF;
             }
         }
 


More information about the unixODBC-dev mailing list