Skip to content

Commit

Permalink
Don't check state with shared env
Browse files Browse the repository at this point in the history
  • Loading branch information
lurcher committed Jul 18, 2023
1 parent 0e76b35 commit f6dc22c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions DriverManager/SQLFreeHandle.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,27 @@ SQLRETURN __SQLFreeHandle( SQLSMALLINT handle_type,

thread_protect( SQL_HANDLE_ENV, environment );

#ifdef WITH_SHARDENV
if ( pooling_enabled == 0 ) {
/*
* check states
*/
if ( environment -> state != STATE_E1 )
{
dm_log_write( __FILE__,
__LINE__,
LOG_INFO,
LOG_INFO,
"Error: HY010" );

__post_internal_error( &environment -> error,
ERROR_HY010, NULL,
environment -> requested_version );

return function_return_nodrv( SQL_HANDLE_ENV, environment, SQL_ERROR );
}
}
#else
/*
* check states
*/
Expand All @@ -247,6 +268,7 @@ SQLRETURN __SQLFreeHandle( SQLSMALLINT handle_type,

return function_return_nodrv( SQL_HANDLE_ENV, environment, SQL_ERROR );
}
#endif

thread_release( SQL_HANDLE_ENV, environment );

Expand Down

0 comments on commit f6dc22c

Please sign in to comment.