Skip to content

Commit

Permalink
Fixed CORE-5032: Cannot connect to a database which have own security…
Browse files Browse the repository at this point in the history
… database without security3.fdb
  • Loading branch information
AlexPeshkoff committed Dec 16, 2015
1 parent e39801c commit 3c3dbf6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/remote/server/os/posix/inet_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ static void raiseLimit(int resource);

static void logSecurityDatabaseError(const char* path, ISC_STATUS* status)
{
// If I/O error happened then rather likely we just miss standard security DB
// Since FB3 with it's multiple security databases - not too big trouble
if (fb_utils::containsErrorCode(status, isc_unavailable))
return;

const int SHUTDOWN_TIMEOUT = 5000; // 5 sec

gds__log_status(path, status);
Expand Down Expand Up @@ -403,11 +408,12 @@ int CLIB_ROUTINE main( int argc, char** argv)
{
logSecurityDatabaseError(path, status);
}

isc_detach_database(status, &db_handle);
if (status[0] == 1 && status[1] > 0)
{
logSecurityDatabaseError(path, status);
else {
isc_detach_database(status, &db_handle);
if (status[0] == 1 && status[1] > 0)
{
logSecurityDatabaseError(path, status);
}
}
} // end scope

Expand Down

0 comments on commit 3c3dbf6

Please sign in to comment.