mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:03:03 +01:00
On behalf of hvlad after sourceforge crash - Backport fix for bug CORE-4860 : Online validation fails on WINDOWS if dbname
argument contains forward slash ('/') and concurrent attachment which also uses '/' exists.
This commit is contained in:
parent
d51144473d
commit
6e7b2fd83a
@ -574,6 +574,7 @@ VI. ADDITIONAL NOTES
|
|||||||
#include "../common/classes/PublicHandle.h"
|
#include "../common/classes/PublicHandle.h"
|
||||||
#include "../jrd/intl_proto.h"
|
#include "../jrd/intl_proto.h"
|
||||||
#include "../jrd/lck_proto.h"
|
#include "../jrd/lck_proto.h"
|
||||||
|
#include "../jrd/isc_f_proto.h"
|
||||||
|
|
||||||
#ifdef DEBUG_VAL_VERBOSE
|
#ifdef DEBUG_VAL_VERBOSE
|
||||||
#include "../jrd/dmp_proto.h"
|
#include "../jrd/dmp_proto.h"
|
||||||
@ -1003,10 +1004,16 @@ static int validate(Service* svc)
|
|||||||
dpb.insertString(isc_dpb_trusted_auth, userName);
|
dpb.insertString(isc_dpb_trusted_auth, userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PathName expandedFilename = dbName;
|
||||||
|
ISC_expand_filename(expandedFilename, NULL);
|
||||||
|
|
||||||
|
if (dbName != expandedFilename)
|
||||||
|
dpb.insertPath(isc_dpb_org_filename, dbName);
|
||||||
|
|
||||||
ISC_STATUS_ARRAY status = {0};
|
ISC_STATUS_ARRAY status = {0};
|
||||||
Attachment *att = NULL;
|
Attachment *att = NULL;
|
||||||
|
|
||||||
if (jrd8_attach_database(status, dbName.c_str(), &att, dpb.getBufferLength(), dpb.getBuffer()))
|
if (jrd8_attach_database(status, expandedFilename.c_str(), &att, dpb.getBufferLength(), dpb.getBuffer()))
|
||||||
{
|
{
|
||||||
svc->setServiceStatus(status);
|
svc->setServiceStatus(status);
|
||||||
return FB_FAILURE;
|
return FB_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user