mirror of https://github.com/citusdata/citus.git
Validate attribute prefix existance on query string
parent
0de2ebad3f
commit
59990addd1
|
@ -30,7 +30,7 @@ static void AttributeMetricsIfApplicable(void);
|
||||||
|
|
||||||
ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
|
ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
|
||||||
|
|
||||||
#define ATTRIBUTE_PREFIX "/*{"
|
#define ATTRIBUTE_PREFIX "{\"tId\":"
|
||||||
#define ATTRIBUTE_STRING_FORMAT "/*{\"tId\":%s,\"cId\":%d}*/"
|
#define ATTRIBUTE_STRING_FORMAT "/*{\"tId\":%s,\"cId\":%d}*/"
|
||||||
#define CITUS_STATS_TENANTS_COLUMNS 7
|
#define CITUS_STATS_TENANTS_COLUMNS 7
|
||||||
#define ONE_QUERY_SCORE 1000000000
|
#define ONE_QUERY_SCORE 1000000000
|
||||||
|
@ -159,6 +159,8 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strncmp(ATTRIBUTE_PREFIX, query_string, strlen(ATTRIBUTE_PREFIX)) == 0)
|
||||||
|
{
|
||||||
char *annotation = extractTopComment(query_string);
|
char *annotation = extractTopComment(query_string);
|
||||||
if (annotation != NULL)
|
if (annotation != NULL)
|
||||||
{
|
{
|
||||||
|
@ -181,12 +183,8 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType)
|
||||||
colocationGroupId)));
|
colocationGroupId)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/*Assert(attributeToTenant == NULL); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*DetachSegment(); */
|
|
||||||
attributeToTenantStart = clock();
|
attributeToTenantStart = clock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue