From 161ec751d15a9c00ef830fcd2c4c9cec0c550137 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Thu, 23 Mar 2023 12:22:03 +0300 Subject: [PATCH] Validate tenantId and colocationId --- src/backend/distributed/utils/attribute.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/distributed/utils/attribute.c b/src/backend/distributed/utils/attribute.c index 8dd222205..db5a5d0cb 100644 --- a/src/backend/distributed/utils/attribute.c +++ b/src/backend/distributed/utils/attribute.c @@ -207,6 +207,11 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType) void AttributeTask(char *tenantId, int colocationId, CmdType commandType) { + if (tenantId == NULL || colocationId == INVALID_COLOCATION_ID) + { + return; + } + colocationGroupId = colocationId; strcpy_s(attributeToTenant, sizeof(attributeToTenant), tenantId); attributeCommandType = commandType;