Changeset: 6c5e8a40678f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6c5e8a40678f
Modified Files:
        sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb/Tests/check.stable.out
        sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
Branch: Dec2025
Log Message:

More upgrade approvals.


diffs (259 lines):

diff --git a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
@@ -256,3 +256,25 @@ update sys.functions set system = true w
 Running database upgrade commands:
 delete from sys.dependencies where id in (2004, 2005, 2006) and depend_id in 
(select id from sys._tables where name in ('check_constraints', 
'table_constraints') and schema_id = (select id from sys.schemas where name = 
'information_schema'));
 
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
@@ -256,3 +256,25 @@ update sys.functions set system = true w
 Running database upgrade commands:
 delete from sys.dependencies where id in (2004, 2005, 2006) and depend_id in 
(select id from sys._tables where name in ('check_constraints', 
'table_constraints') and schema_id = (select id from sys.schemas where name = 
'information_schema'));
 
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
@@ -0,0 +1,22 @@
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
@@ -0,0 +1,22 @@
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/emptydb/Tests/check.stable.out 
b/sql/test/emptydb/Tests/check.stable.out
--- a/sql/test/emptydb/Tests/check.stable.out
+++ b/sql/test/emptydb/Tests/check.stable.out
@@ -560,7 +560,7 @@ select 'null in fkeys.delete_action', de
 [ "sys._tables",       "sys",  "range_partitions",     NULL,   "TABLE",        
true,   "COMMIT",       "WRITABLE",     NULL    ]
 [ "sys._tables",       "sys",  "rejects",      "create view sys.rejects as 
select * from sys.rejects();",      "VIEW", true,   "COMMIT",       "WRITABLE", 
    NULL    ]
 [ "sys._tables",       "sys",  "remote_user_info",     NULL,   "TABLE",        
true,   "COMMIT",       "WRITABLE",     NULL    ]
-[ "sys._tables",       "sys",  "roles",        "create view sys.roles as 
select id, name, grantor from sys.auths a where a.name not in (select u.name 
from sys.db_user_info u);",      "VIEW", true,   "COMMIT",       "WRITABLE",    
 NULL    ]
+[ "sys._tables",       "sys",  "roles",        "create view sys.roles as 
select id, name, grantor from sys.auths;",    "VIEW", true,   "COMMIT",       
"WRITABLE",     NULL    ]
 [ "sys._tables",       "sys",  "schemas",      NULL,   "TABLE",        true,   
"COMMIT",       "WRITABLE",     NULL    ]
 [ "sys._tables",       "sys",  "schemastorage",        "create view 
sys.\"schemastorage\" as select \"schema\", count(*) as \"storages\", 
sum(columnsize) as columnsize, sum(heapsize) as heapsize, sum(hashes) as 
hashsize, sum(\"imprints\") as imprintsize, sum(orderidx) as orderidxsize from 
sys.\"storage\" group by \"schema\" order by \"schema\";",   "VIEW", true,   
"COMMIT",       "WRITABLE",     NULL    ]
 [ "sys._tables",       "sys",  "sequences",    NULL,   "TABLE",        true,   
"COMMIT",       "WRITABLE",     NULL    ]
@@ -3457,7 +3457,6 @@ select 'null in fkeys.delete_action', de
 [ "table used by view",        "tmp",  "keys", "sys",  "ids",  "VIEW"  ]
 [ "table used by view",        "tmp",  "triggers",     "sys",  "ids",  "VIEW"  
]
 [ "table used by view",        "sys",  "auths",        "sys",  "roles",        
"VIEW"  ]
-[ "table used by view",        "sys",  "db_user_info", "sys",  "roles",        
"VIEW"  ]
 [ "table used by view",        "sys",  "storage",      "sys",  
"schemastorage",        "VIEW"  ]
 [ "table used by view",        "sys",  "schemas",      "sys",  "statistics",   
"VIEW"  ]
 [ "table used by view",        "sys",  "tables",       "sys",  "statistics",   
"VIEW"  ]
@@ -4324,7 +4323,6 @@ select 'null in fkeys.delete_action', de
 [ "column used by view",       "sys",  "auths",        "grantor",      "sys",  
"roles",        "VIEW"  ]
 [ "column used by view",       "sys",  "auths",        "id",   "sys",  
"roles",        "VIEW"  ]
 [ "column used by view",       "sys",  "auths",        "name", "sys",  
"roles",        "VIEW"  ]
-[ "column used by view",       "sys",  "db_user_info", "name", "sys",  
"roles",        "VIEW"  ]
 [ "column used by view",       "sys",  "storage",      "columnsize",   "sys",  
"schemastorage",        "VIEW"  ]
 [ "column used by view",       "sys",  "storage",      "hashes",       "sys",  
"schemastorage",        "VIEW"  ]
 [ "column used by view",       "sys",  "storage",      "heapsize",     "sys",  
"schemastorage",        "VIEW"  ]
@@ -6118,8 +6116,8 @@ select 'null in fkeys.delete_action', de
 % %7,  role_id,        login_id,       role_id # name
 % varchar,     int,    int,    int # type
 % 0,   1,      1,      1 # length
-% .%7, sys.user_role,  sys.user_role,  sys.user_role # table_name
-% %7,  role_id,        login_id,       role_id # name
+% .%4, sys.user_role,  sys.user_role,  sys.user_role # table_name
+% %4,  role_id,        login_id,       role_id # name
 % varchar,     int,    int,    int # type
 % 0,   1,      1,      1 # length
 % .%4, sys.privileges, sys.privileges, sys.privileges, sys.privileges, 
sys.privileges, sys.privileges # table_name
diff --git a/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
@@ -256,3 +256,25 @@ update sys.functions set system = true w
 Running database upgrade commands:
 delete from sys.dependencies where id in (2004, 2005, 2006) and depend_id in 
(select id from sys._tables where name in ('check_constraints', 
'table_constraints') and schema_id = (select id from sys.schemas where name = 
'information_schema'));
 
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out 
b/sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
--- a/sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
@@ -256,3 +256,25 @@ update sys.functions set system = true w
 Running database upgrade commands:
 delete from sys.dependencies where id in (2004, 2005, 2006) and depend_id in 
(select id from sys._tables where name in ('check_constraints', 
'table_constraints') and schema_id = (select id from sys.schemas where name = 
'information_schema'));
 
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
@@ -0,0 +1,22 @@
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out 
b/sql/test/testdb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out
@@ -0,0 +1,22 @@
+Running database upgrade commands:
+DROP VIEW sys.describe_accessible_tables CASCADE;
+DROP VIEW sys.roles CASCADE;
+CREATE VIEW sys.roles AS SELECT id, name, grantor FROM sys.auths;
+GRANT SELECT ON sys.roles TO PUBLIC;
+CREATE VIEW sys.describe_accessible_tables AS
+    SELECT
+        schemas.name AS schema,
+        tables.name  AS table,
+        tt.table_type_name AS table_type,
+        pc.privilege_code_name AS privs,
+        p.privileges AS privs_code
+    FROM privileges p
+    JOIN sys.roles ON p.auth_id = roles.id
+    JOIN sys.tables ON p.obj_id = tables.id
+    JOIN sys.table_types tt ON tables.type = tt.table_type_id
+    JOIN sys.schemas ON tables.schema_id = schemas.id
+    JOIN sys.privilege_codes pc ON p.privileges = pc.privilege_code_id
+    WHERE roles.name = current_role;
+GRANT SELECT ON sys.describe_accessible_tables TO PUBLIC;
+UPDATE sys._tables SET system = true WHERE not system and schema_id = 2000 and 
name in ('roles', 'describe_accessible_tables');
+
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to