mirror of https://github.com/citusdata/citus.git
Fixes main merge errors
parent
943aaf39b4
commit
86817ff094
|
@ -153,7 +153,7 @@ static void PostStandardProcessUtility(Node *parsetree);
|
||||||
static void DecrementUtilityHookCountersIfNecessary(Node *parsetree);
|
static void DecrementUtilityHookCountersIfNecessary(Node *parsetree);
|
||||||
static bool IsDropSchemaOrDB(Node *parsetree);
|
static bool IsDropSchemaOrDB(Node *parsetree);
|
||||||
static bool ShouldCheckUndistributeCitusLocalTables(void);
|
static bool ShouldCheckUndistributeCitusLocalTables(void);
|
||||||
static void RunPreprocessMainDBCommand(Node *parsetree, const char *queryString);
|
static void RunPreprocessMainDBCommand(Node *parsetree);
|
||||||
static void RunPostprocessMainDBCommand(Node *parsetree);
|
static void RunPostprocessMainDBCommand(Node *parsetree);
|
||||||
static bool IsStatementSupportedFromNonMainDb(Node *parsetree);
|
static bool IsStatementSupportedFromNonMainDb(Node *parsetree);
|
||||||
static bool StatementRequiresMarkDistributedFromNonMainDb(Node *parsetree);
|
static bool StatementRequiresMarkDistributedFromNonMainDb(Node *parsetree);
|
||||||
|
@ -292,7 +292,7 @@ citus_ProcessUtility(PlannedStmt *pstmt,
|
||||||
{
|
{
|
||||||
if (!IsMainDB)
|
if (!IsMainDB)
|
||||||
{
|
{
|
||||||
RunPreprocessMainDBCommand(parsetree, queryString);
|
RunPreprocessMainDBCommand(parsetree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1636,13 +1636,14 @@ DropSchemaOrDBInProgress(void)
|
||||||
* database before query is run on the local node with PrevProcessUtility
|
* database before query is run on the local node with PrevProcessUtility
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
RunPreprocessMainDBCommand(Node *parsetree, const char *queryString)
|
RunPreprocessMainDBCommand(Node *parsetree)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!IsStatementSupportedFromNonMainDb(parsetree))
|
if (!IsStatementSupportedFromNonMainDb(parsetree))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
char *queryString = DeparseTreeNode(parsetree);
|
||||||
StringInfo mainDBQuery = makeStringInfo();
|
StringInfo mainDBQuery = makeStringInfo();
|
||||||
appendStringInfo(mainDBQuery,
|
appendStringInfo(mainDBQuery,
|
||||||
START_MANAGEMENT_TRANSACTION,
|
START_MANAGEMENT_TRANSACTION,
|
||||||
|
|
|
@ -74,7 +74,7 @@ AppendGrantRestrictAndCascade(StringInfo buf, GrantStmt *stmt)
|
||||||
void
|
void
|
||||||
AppendGrantedByInGrantForRoleSpec(StringInfo buf, RoleSpec *grantor, bool isGrant)
|
AppendGrantedByInGrantForRoleSpec(StringInfo buf, RoleSpec *grantor, bool isGrant)
|
||||||
{
|
{
|
||||||
if (isGrant && grantor)
|
if (grantor)
|
||||||
{
|
{
|
||||||
appendStringInfo(buf, " GRANTED BY %s", RoleSpecString(grantor, true));
|
appendStringInfo(buf, " GRANTED BY %s", RoleSpecString(grantor, true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,8 +486,8 @@ AppendGrantRoleStmt(StringInfo buf, GrantRoleStmt *stmt)
|
||||||
appendStringInfo(buf, "%s ", stmt->is_grant ? " TO " : " FROM ");
|
appendStringInfo(buf, "%s ", stmt->is_grant ? " TO " : " FROM ");
|
||||||
AppendRoleList(buf, stmt->grantee_roles);
|
AppendRoleList(buf, stmt->grantee_roles);
|
||||||
AppendGrantWithAdminOption(buf, stmt);
|
AppendGrantWithAdminOption(buf, stmt);
|
||||||
AppendGrantRestrictAndCascadeForRoleSpec(buf, stmt->behavior, stmt->is_grant);
|
|
||||||
AppendGrantedByInGrantForRoleSpec(buf, stmt->grantor, stmt->is_grant);
|
AppendGrantedByInGrantForRoleSpec(buf, stmt->grantor, stmt->is_grant);
|
||||||
|
AppendGrantRestrictAndCascadeForRoleSpec(buf, stmt->behavior, stmt->is_grant);
|
||||||
appendStringInfo(buf, ";");
|
appendStringInfo(buf, ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ $$);
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false}]
|
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false}]
|
||||||
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false}]
|
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false}]
|
||||||
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"postgres","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"postgres","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"postgres","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"postgres","admin_option":false}]
|
[{"member":"grant_role2pc_user3","role":"grant_role2pc_user1","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user3","role":"grant_role2pc_user2","grantor":"postgres","admin_option":true},{"member":"grant_role2pc_user4","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user4","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user1","grantor":"grant_role2pc_user3","admin_option":false},{"member":"grant_role2pc_user5","role":"grant_role2pc_user2","grantor":"grant_role2pc_user3","admin_option":false}]
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
\c metadata_sync_2pc_db
|
\c metadata_sync_2pc_db
|
||||||
|
|
Loading…
Reference in New Issue