From f7a4a90e936d6db22bdf70a8228ab34e802d04c3 Mon Sep 17 00:00:00 2001 From: gentle_hu Date: Wed, 1 Mar 2023 15:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E7=A8=B3=E5=AE=9A?= =?UTF-8?q?=E5=B9=B6=E5=8F=91fastcheck=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 并发alter_table_modify alter_table_modify_ustore 用例中, 使用了同样的用户名,当两个用例的这部分同时执行时,会导致错误 --- .../expected/alter_table_modify_ustore.out | 16 ++++++++-------- .../regress/sql/alter_table_modify_ustore.sql | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/test/regress/expected/alter_table_modify_ustore.out b/src/test/regress/expected/alter_table_modify_ustore.out index ff30fd730..c250015f9 100644 --- a/src/test/regress/expected/alter_table_modify_ustore.out +++ b/src/test/regress/expected/alter_table_modify_ustore.out @@ -1866,19 +1866,19 @@ DETAIL: modify or change a column used by materialized view or rule is not supp DROP RULE test_at_change_rule ON test_at_change_depend; -- --RLSPOLICY reference column. DROP TABLE test_at_change_depend; -CREATE ROLE at_change_role PASSWORD 'Gauss@123'; +CREATE ROLE at_change_ustore_role PASSWORD 'Gauss@123'; CREATE TABLE test_at_change_depend( a int, b int NOT NULL ) WITH(STORAGE_TYPE=USTORE); INSERT INTO test_at_change_depend VALUES(0,0); -GRANT USAGE ON SCHEMA atbdb_ustore_schema TO at_change_role; -GRANT SELECT ON test_at_change_depend TO at_change_role; +GRANT USAGE ON SCHEMA atbdb_ustore_schema TO at_change_ustore_role; +GRANT SELECT ON test_at_change_depend TO at_change_ustore_role; ALTER TABLE test_at_change_depend ENABLE ROW LEVEL SECURITY; -CREATE ROW LEVEL SECURITY POLICY test_at_change_rls ON test_at_change_depend AS RESTRICTIVE FOR SELECT TO at_change_role USING(b >= 20); +CREATE ROW LEVEL SECURITY POLICY test_at_change_rls ON test_at_change_depend AS RESTRICTIVE FOR SELECT TO at_change_ustore_role USING(b >= 20); ALTER TABLE test_at_change_depend CHANGE COLUMN b b1 int not null; INSERT INTO test_at_change_depend VALUES(21,21); -SET ROLE at_change_role PASSWORD 'Gauss@123'; +SET ROLE at_change_ustore_role PASSWORD 'Gauss@123'; SELECT * FROM test_at_change_depend ORDER BY 1,2; a | b1 ----+---- @@ -1896,7 +1896,7 @@ SELECT * FROM test_at_change_depend ORDER BY 1,2; ALTER TABLE test_at_change_depend CHANGE COLUMN b1 b2 bool not null; ALTER TABLE test_at_change_depend CHANGE COLUMN b2 b3 int not null; INSERT INTO test_at_change_depend VALUES(22,22); -SET ROLE at_change_role PASSWORD 'Gauss@123'; +SET ROLE at_change_ustore_role PASSWORD 'Gauss@123'; SELECT * FROM test_at_change_depend ORDER BY 1,2; a | b3 ----+---- @@ -1913,8 +1913,8 @@ SELECT * FROM test_at_change_depend ORDER BY 1,2; (3 rows) DROP TABLE test_at_change_depend; -REVOKE ALL PRIVILEGES ON SCHEMA atbdb_ustore_schema FROM at_change_role; -DROP ROLE at_change_role; +REVOKE ALL PRIVILEGES ON SCHEMA atbdb_ustore_schema FROM at_change_ustore_role; +DROP ROLE at_change_ustore_role; -- test alter command order CREATE TABLE test_at_pass( a int, diff --git a/src/test/regress/sql/alter_table_modify_ustore.sql b/src/test/regress/sql/alter_table_modify_ustore.sql index e7f85790e..176d345ea 100644 --- a/src/test/regress/sql/alter_table_modify_ustore.sql +++ b/src/test/regress/sql/alter_table_modify_ustore.sql @@ -729,32 +729,32 @@ DROP RULE test_at_change_rule ON test_at_change_depend; -- --RLSPOLICY reference column. DROP TABLE test_at_change_depend; -CREATE ROLE at_change_role PASSWORD 'Gauss@123'; +CREATE ROLE at_change_ustore_role PASSWORD 'Gauss@123'; CREATE TABLE test_at_change_depend( a int, b int NOT NULL ) WITH(STORAGE_TYPE=USTORE); INSERT INTO test_at_change_depend VALUES(0,0); -GRANT USAGE ON SCHEMA atbdb_ustore_schema TO at_change_role; -GRANT SELECT ON test_at_change_depend TO at_change_role; +GRANT USAGE ON SCHEMA atbdb_ustore_schema TO at_change_ustore_role; +GRANT SELECT ON test_at_change_depend TO at_change_ustore_role; ALTER TABLE test_at_change_depend ENABLE ROW LEVEL SECURITY; -CREATE ROW LEVEL SECURITY POLICY test_at_change_rls ON test_at_change_depend AS RESTRICTIVE FOR SELECT TO at_change_role USING(b >= 20); +CREATE ROW LEVEL SECURITY POLICY test_at_change_rls ON test_at_change_depend AS RESTRICTIVE FOR SELECT TO at_change_ustore_role USING(b >= 20); ALTER TABLE test_at_change_depend CHANGE COLUMN b b1 int not null; INSERT INTO test_at_change_depend VALUES(21,21); -SET ROLE at_change_role PASSWORD 'Gauss@123'; +SET ROLE at_change_ustore_role PASSWORD 'Gauss@123'; SELECT * FROM test_at_change_depend ORDER BY 1,2; RESET ROLE; SELECT * FROM test_at_change_depend ORDER BY 1,2; ALTER TABLE test_at_change_depend CHANGE COLUMN b1 b2 bool not null; ALTER TABLE test_at_change_depend CHANGE COLUMN b2 b3 int not null; INSERT INTO test_at_change_depend VALUES(22,22); -SET ROLE at_change_role PASSWORD 'Gauss@123'; +SET ROLE at_change_ustore_role PASSWORD 'Gauss@123'; SELECT * FROM test_at_change_depend ORDER BY 1,2; RESET ROLE; SELECT * FROM test_at_change_depend ORDER BY 1,2; DROP TABLE test_at_change_depend; -REVOKE ALL PRIVILEGES ON SCHEMA atbdb_ustore_schema FROM at_change_role; -DROP ROLE at_change_role; +REVOKE ALL PRIVILEGES ON SCHEMA atbdb_ustore_schema FROM at_change_ustore_role; +DROP ROLE at_change_ustore_role; -- test alter command order CREATE TABLE test_at_pass(