Movatterモバイル変換


[0]ホーム

URL:


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

Commitcf55766

Browse files
committed
Show error when user tries to use wrong database
1 parentaf8b8d1 commitcf55766

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎multimaster.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ char const* const MtmTxnStatusMnem[] =
218218
boolMtmDoReplication;
219219
char*MtmDatabaseName;
220220
char*MtmDatabaseUser;
221+
OidMtmDatabaseId;
221222

222223
intMtmNodes;
223224
intMtmNodeId;
@@ -938,6 +939,12 @@ MtmPrePrepareTransaction(MtmCurrentTrans* x)
938939
boolfound;
939940
MTM_TXTRACE(x,"PrePrepareTransaction Start");
940941

942+
if (!MtmDatabaseId)
943+
MtmDatabaseId=get_database_oid(MtmDatabaseName, false);
944+
945+
if (MtmDatabaseId!=MyDatabaseId)
946+
MTM_ELOG(ERROR,"Refusing to work. Multimaster configured to work with database '%s'",MtmDatabaseName);
947+
941948
if (!x->isDistributed) {
942949
return;
943950
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp