File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,6 @@ MtmBeginTransaction()
84
84
85
85
MtmDDLResetStatement ();
86
86
87
- if (!MtmDatabaseId )
88
- MtmDatabaseId = get_database_oid (MtmDatabaseName , false);
89
-
90
- // XXX: maybe allow commit, but don't use mm?
91
- if (MtmDatabaseId != MyDatabaseId )
92
- mtm_log (ERROR ,
93
- "Refusing to work. Multimaster configured to work with database '%s'" ,
94
- MtmDatabaseName );
95
-
96
87
/* XXX: ugly hack with debug_query_string */
97
88
98
89
/* Application name can be changed using PGAPPNAME environment variable */
@@ -110,7 +101,7 @@ MtmBeginTransaction()
110
101
}
111
102
}
112
103
113
- bool // XXX: do we need that bool?
104
+ bool
114
105
MtmTwoPhaseCommit ()
115
106
{
116
107
nodemask_t participantsMask ;
@@ -120,6 +111,15 @@ MtmTwoPhaseCommit()
120
111
char stream [DMQ_NAME_MAXLEN ];
121
112
pgid_t gid ;
122
113
114
+ if (!MtmDatabaseId )
115
+ MtmDatabaseId = get_database_oid (MtmDatabaseName , false);
116
+
117
+ if (MtmDatabaseId != MyDatabaseId )
118
+ return false;
119
+ // mtm_log(ERROR,
120
+ // "Refusing to work. Multimaster configured to work with database '%s'",
121
+ // MtmDatabaseName);
122
+
123
123
if ( (!MtmTx .contains_ddl && !MtmTx .contains_dml ) || !Mtm -> extension_created )
124
124
return false;
125
125
You can’t perform that action at this time.
0 commit comments