|
62 | 62 | #include"pglogical_output/hooks.h"
|
63 | 63 | #include"parser/analyze.h"
|
64 | 64 | #include"parser/parse_relation.h"
|
| 65 | +#include"tcop/pquery.h" |
65 | 66 |
|
66 | 67 | #include"multimaster.h"
|
67 | 68 | #include"ddd.h"
|
@@ -3938,13 +3939,15 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
|
3938 | 3939 | if (!skipCommand&& (context==PROCESS_UTILITY_TOPLEVEL||MtmUtilityProcessedInXid!=GetCurrentTransactionId()))
|
3939 | 3940 | MtmUtilityProcessedInXid=InvalidTransactionId;
|
3940 | 3941 |
|
3941 |
| -if (context==PROCESS_UTILITY_TOPLEVEL||context==PROCESS_UTILITY_QUERY) |
3942 |
| -{ |
3943 |
| -if (!skipCommand&& !MtmTx.isReplicated&& (MtmUtilityProcessedInXid==InvalidTransactionId)) { |
3944 |
| -MtmUtilityProcessedInXid=GetCurrentTransactionId(); |
| 3942 | +if (!skipCommand&& !MtmTx.isReplicated&& (MtmUtilityProcessedInXid==InvalidTransactionId)) { |
| 3943 | +MtmUtilityProcessedInXid=GetCurrentTransactionId(); |
| 3944 | + |
| 3945 | +if (context==PROCESS_UTILITY_TOPLEVEL) |
3945 | 3946 | MtmProcessDDLCommand(queryString, true);
|
3946 |
| -executed= true; |
3947 |
| -} |
| 3947 | +else |
| 3948 | +MtmProcessDDLCommand(ActivePortal->sourceText, true); |
| 3949 | + |
| 3950 | +executed= true; |
3948 | 3951 | }
|
3949 | 3952 |
|
3950 | 3953 | if (PreviousProcessUtilityHook!=NULL)
|
|