[unixODBC-support] another patch - freeing implicit descriptor not checked

Jess Balint jbalint at gmail.com
Sat Dec 15 01:37:43 GMT 2007


The HY017 should be reported from SQLFreeHandle(). diff below from
latest cvs tree

Jess


Index: DriverManager/SQLFreeHandle.c
===================================================================
RCS file: /cvsroot/unixodbc/unixODBC/DriverManager/SQLFreeHandle.c,v
retrieving revision 1.9
diff -u -r1.9 SQLFreeHandle.c
--- DriverManager/SQLFreeHandle.c       2 Jan 2007 10:27:50 -0000       1.9
+++ DriverManager/SQLFreeHandle.c       15 Dec 2007 01:37:06 -0000
@@ -503,6 +503,21 @@

             connection = descriptor -> connection;

+            if ( descriptor -> implicit )
+            {
+                dm_log_write( __FILE__,
+                        __LINE__,
+                        LOG_INFO,
+                        LOG_INFO,
+                        "Error: HY017" );
+
+                __post_internal_error( &descriptor -> error,
+                        ERROR_HY017, NULL,
+                        connection -> environment -> requested_version );
+
+                return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
+            }
+
             if ( log_info.log_flag )
             {
                 sprintf( descriptor -> msg,




More information about the unixODBC-support mailing list