mirror of https://github.com/citusdata/citus.git
Fixes test errors
parent
6d964baa0c
commit
0299897395
|
@ -697,7 +697,19 @@ PreprocessDropDatabaseStmt(Node *node, const char *queryString,
|
|||
List *
|
||||
PreprocessAlterDatabaseOwnerStmt(Node *node, const char *queryString,
|
||||
ProcessUtilityContext processUtilityContext){
|
||||
|
||||
const DistributeObjectOps *ops = GetDistributeObjectOps(node);
|
||||
Assert(ops != NULL);
|
||||
|
||||
if (ops->featureFlag && *ops->featureFlag == false)
|
||||
{
|
||||
/* not propagating when a configured feature flag is turned off by the user */
|
||||
return NIL;
|
||||
}
|
||||
|
||||
List *addresses = GetObjectAddressListFromParseTree(node, false, false);
|
||||
/* the code-path only supports a single object */
|
||||
Assert(list_length(addresses) == 1);
|
||||
|
||||
if (!ShouldPropagateAnyObject(addresses))
|
||||
{
|
||||
|
|
|
@ -217,56 +217,34 @@ set citus.grep_remote_commands = "%ALTER DATABASE%";
|
|||
alter database "altered_database!'2" rename to altered_database_renamed;
|
||||
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE "altered_database!''2" RENAME TO altered_database_renamed', 'postgres')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE altered_database_renamed RENAME TO "altered_database!''2"', 'postgres')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database "altered_database!'2" with
|
||||
ALLOW_CONNECTIONS true
|
||||
CONNECTION LIMIT 0
|
||||
IS_TEMPLATE false;
|
||||
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE "altered_database!''2" WITH ALLOW_CONNECTIONS true CONNECTION LIMIT 0 IS_TEMPLATE false;', 'postgres')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
ERROR: database "altered_database!'2" does not exist
|
||||
\c regression - - :worker_2_port
|
||||
set citus.log_remote_commands = true;
|
||||
set citus.grep_remote_commands = "%ALTER DATABASE%";
|
||||
alter database "altered_database!'2" with
|
||||
ALLOW_CONNECTIONS false
|
||||
CONNECTION LIMIT 1
|
||||
IS_TEMPLATE true;
|
||||
ERROR: database "altered_database!'2" does not exist
|
||||
NOTICE: issuing ALTER DATABASE "altered_database!'2" WITH ALLOW_CONNECTIONS false CONNECTION LIMIT 1 IS_TEMPLATE true;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE "altered_database!'2" WITH ALLOW_CONNECTIONS false CONNECTION LIMIT 1 IS_TEMPLATE true;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database "altered_database!'2" with
|
||||
ALLOW_CONNECTIONS true
|
||||
CONNECTION LIMIT 0
|
||||
IS_TEMPLATE false;
|
||||
ERROR: database "altered_database!'2" does not exist
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx');
|
||||
NOTICE: issuing ALTER DATABASE "altered_database!'2" WITH ALLOW_CONNECTIONS true CONNECTION LIMIT 0 IS_TEMPLATE false;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_internal.acquire_citus_advisory_object_class_lock(26, NULL)
|
||||
NOTICE: issuing ALTER DATABASE "altered_database!'2" WITH ALLOW_CONNECTIONS true CONNECTION LIMIT 0 IS_TEMPLATE false;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SELECT citus_internal.acquire_citus_advisory_object_class_lock(26, 'altered_database_renamed')
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET citus.enable_ddl_propagation TO 'off'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE altered_database_renamed RENAME TO "altered_database!'2"
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET citus.enable_ddl_propagation TO 'on'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;SELECT assign_distributed_transaction_id(xx, xx, 'xxxxxxx');
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET citus.enable_ddl_propagation TO 'off'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE altered_database_renamed RENAME TO "altered_database!'2"
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing SET citus.enable_ddl_propagation TO 'on'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing PREPARE TRANSACTION 'citus_xx_xx_xx_xx'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing PREPARE TRANSACTION 'citus_xx_xx_xx_xx'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT PREPARED 'citus_xx_xx_xx_xx'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing COMMIT PREPARED 'citus_xx_xx_xx_xx'
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
ERROR: database "altered_database_renamed" does not exist
|
||||
\c regression
|
||||
create role test_owner_non_main_db;
|
||||
\c test_alter_db_from_nonmain_db
|
||||
|
|
|
@ -86,6 +86,8 @@ set citus.log_remote_commands = true;
|
|||
set citus.grep_remote_commands = "%ALTER DATABASE%";
|
||||
alter database "altered_database!'2" rename to altered_database_renamed;
|
||||
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
|
||||
|
||||
alter database "altered_database!'2" with
|
||||
ALLOW_CONNECTIONS true
|
||||
|
@ -94,6 +96,7 @@ alter database "altered_database!'2" with
|
|||
|
||||
\c regression - - :worker_2_port
|
||||
set citus.log_remote_commands = true;
|
||||
set citus.grep_remote_commands = "%ALTER DATABASE%";
|
||||
|
||||
alter database "altered_database!'2" with
|
||||
ALLOW_CONNECTIONS false
|
||||
|
@ -104,9 +107,6 @@ alter database "altered_database!'2" with
|
|||
CONNECTION LIMIT 0
|
||||
IS_TEMPLATE false;
|
||||
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
|
||||
alter database altered_database_renamed rename to "altered_database!'2";
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue