mirror of https://github.com/citusdata/citus.git
Fixes naming suggestions
parent
510e5581ad
commit
e2e868166c
|
@ -1630,7 +1630,7 @@ DropSchemaOrDBInProgress(void)
|
||||||
static void
|
static void
|
||||||
RunPreprocessMainDBCommand(Node *parsetree, const char *queryString)
|
RunPreprocessMainDBCommand(Node *parsetree, const char *queryString)
|
||||||
{
|
{
|
||||||
if (!IsStatementSupportedIn2PC(parsetree))
|
if (!IsStatementSupportedInNonMainDb(parsetree))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1656,8 +1656,8 @@ RunPreprocessMainDBCommand(Node *parsetree, const char *queryString)
|
||||||
static void
|
static void
|
||||||
RunPostprocessMainDBCommand(Node *parsetree)
|
RunPostprocessMainDBCommand(Node *parsetree)
|
||||||
{
|
{
|
||||||
if (!IsStatementSupportedIn2PC(parsetree) ||
|
if (!IsStatementSupportedInNonMainDb(parsetree) ||
|
||||||
!DoesStatementRequireMarkDistributedFor2PC(parsetree))
|
!StatementRequiresMarkDistributedFromNonMainDb(parsetree))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1683,14 +1683,14 @@ RunPostprocessMainDBCommand(Node *parsetree)
|
||||||
* non-main database.
|
* non-main database.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
IsStatementSupportedIn2PC(Node *parsetree)
|
IsStatementSupportedInNonMainDb(Node *parsetree)
|
||||||
{
|
{
|
||||||
NodeTag type = nodeTag(parsetree);
|
NodeTag type = nodeTag(parsetree);
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(twoPcSupportedStatements) /
|
for (int i = 0; i < sizeof(NonMainDbSupportedStatements) /
|
||||||
sizeof(twoPcSupportedStatements[0]); i++)
|
sizeof(NonMainDbSupportedStatements[0]); i++)
|
||||||
{
|
{
|
||||||
if (type == twoPcSupportedStatements[i].statementType)
|
if (type == NonMainDbSupportedStatements[i].statementType)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1705,16 +1705,16 @@ IsStatementSupportedIn2PC(Node *parsetree)
|
||||||
* as distributed when executed from a non-main database.
|
* as distributed when executed from a non-main database.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
DoesStatementRequireMarkDistributedFor2PC(Node *parsetree)
|
StatementRequiresMarkDistributedFromNonMainDb(Node *parsetree)
|
||||||
{
|
{
|
||||||
NodeTag type = nodeTag(parsetree);
|
NodeTag type = nodeTag(parsetree);
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(twoPcSupportedStatements) /
|
for (int i = 0; i < sizeof(NonMainDbSupportedStatements) /
|
||||||
sizeof(twoPcSupportedStatements[0]); i++)
|
sizeof(NonMainDbSupportedStatements[0]); i++)
|
||||||
{
|
{
|
||||||
if (type == twoPcSupportedStatements[i].statementType)
|
if (type == NonMainDbSupportedStatements[i].statementType)
|
||||||
{
|
{
|
||||||
return twoPcSupportedStatements[i].markAsDistributed;
|
return NonMainDbSupportedStatements[i].explicitlyMarkAsDistributed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue