Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f24e49a

Browse files
committed
This should fix #8726: Replication error is raised for CREATE TABLE ... EXTERNAL if the specified disk does not exist on the replica host
1 parent ba248d8 commit f24e49a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

‎src/dsql/DdlNodes.epp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7875,8 +7875,11 @@ void CreateRelationNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScrat
78757875
if (externalFile->length() >= sizeof(REL.RDB$EXTERNAL_FILE))
78767876
status_exception::raise(Arg::Gds(isc_dyn_name_longer));
78777877

7878-
if (ISC_check_if_remote(externalFile->c_str(), false))
7878+
if (!(tdbb->tdbb_flags & TDBB_replicator) &&
7879+
ISC_check_if_remote(externalFile->c_str(), false))
7880+
{
78797881
status_exception::raise(Arg::PrivateDyn(163));
7882+
}
78807883

78817884
REL.RDB$EXTERNAL_FILE.NULL = FALSE;
78827885
strcpy(REL.RDB$EXTERNAL_FILE, externalFile->c_str());

‎src/jrd/dfw.epp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static bool create_expression_index(thread_db* tdbb, SSHORT phase, DeferredWork*
508508
static void check_computed_dependencies(thread_db* tdbb, jrd_tra* transaction,
509509
const QualifiedName& fieldName);
510510
static void check_dependencies(thread_db*, const QualifiedName&, const MetaName&, int, jrd_tra*);
511-
static void check_filename(const Firebird::string&, bool);
511+
static void check_filename(thread_db*, const Firebird::string&, bool);
512512
static void cleanup_index_creation(thread_db*, DeferredWork*, jrd_tra*);
513513
static bool formatsAreEqual(const Format*, const Format*);
514514
static bool find_depend_in_dfw(thread_db*, const QualifiedName&, USHORT, USHORT, jrd_tra*);
@@ -1930,7 +1930,7 @@ static bool add_shadow(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_tr
19301930
return true;
19311931

19321932
case 4:
1933-
check_filename(work->dfw_name.c_str(), false);
1933+
check_filename(tdbb, work->dfw_name.c_str(), false);
19341934

19351935
/* could have two cases:
19361936
1) this shadow has already been written to, so add this file using
@@ -2022,7 +2022,7 @@ static bool add_difference(thread_db* tdbb, SSHORT phase, DeferredWork* work, jr
20222022
ERR_post(Arg::Gds(isc_no_meta_update) <<
20232023
Arg::Gds(isc_wrong_backup_state));
20242024
}
2025-
check_filename(work->dfw_name.c_str(), true);
2025+
check_filename(tdbb, work->dfw_name.c_str(), true);
20262026
dbb->dbb_backup_manager->setDifference(tdbb, work->dfw_name.c_str());
20272027
}
20282028
break;
@@ -2931,7 +2931,7 @@ static void check_dependencies(thread_db* tdbb,
29312931
}
29322932

29332933

2934-
static void check_filename(const Firebird::string& name, bool shareExpand)
2934+
static void check_filename(thread_db* tdbb, const Firebird::string& name, bool shareExpand)
29352935
{
29362936
/**************************************
29372937
*
@@ -2944,6 +2944,9 @@ static void check_filename(const Firebird::string& name, bool shareExpand)
29442944
* inet node name.
29452945
*
29462946
**************************************/
2947+
if (tdbb->tdbb_flags & TDBB_replicator)
2948+
return;
2949+
29472950
const Firebird::PathName file_name(name.ToPathName());
29482951
const bool valid = file_name.find("::") == Firebird::PathName::npos;
29492952

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /