Changeset: 15acd1b89030 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/15acd1b89030
Modified Files:
        testing/sqltest.py
Branch: nested
Log Message:

merge with default


diffs (truncated from 522 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -854,3 +854,4 @@ a63e11c1fd1b2dfba2a0ed8a985455286bc023d3
 b4c2936c46f28ad6b3e59ed5a1a844726d521994 Dec2025_1
 b4c2936c46f28ad6b3e59ed5a1a844726d521994 Dec2025_release
 69f4fe2ad29b5d50d9ef06ad76639faaa60fcfa8 Dec2025_3
+69f4fe2ad29b5d50d9ef06ad76639faaa60fcfa8 Dec2025_SP1_release
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -211,7 +211,8 @@ typedef union {
 
 typedef struct {
        size_t nitems;
-       uint8_t data[] __attribute__((__nonstring__));
+       uint8_t data[] __attribute__((__nonstring__))
+               __attribute__((__counted_by__(nitems)));
 } blob;
 gdk_export size_t blobsize(size_t nitems) __attribute__((__const__));
 
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -409,12 +409,12 @@ extern struct BBPfarm_t {
        uint32_t roles;         /* bitmask of allowed roles */
        const char *dirname;    /* farm directory */
        FILE *lock_file;
-} BBPfarms[MAXFARMS];
+} BBPfarms[MAXFARMS] __attribute__((__visibility__("hidden")));
 
-extern batlock_t GDKbatLock[BBP_BATMASK + 1];
-extern size_t GDK_mmap_minsize_persistent; /* size after which we use memory 
mapped files for persistent heaps */
-extern size_t GDK_mmap_minsize_transient; /* size after which we use memory 
mapped files for transient heaps */
-extern size_t GDK_mmap_pagesize; /* mmap granularity */
+extern batlock_t GDKbatLock[BBP_BATMASK + 1] 
__attribute__((__visibility__("hidden")));
+extern size_t GDK_mmap_minsize_persistent 
__attribute__((__visibility__("hidden"))); /* size after which we use memory 
mapped files for persistent heaps */
+extern size_t GDK_mmap_minsize_transient 
__attribute__((__visibility__("hidden"))); /* size after which we use memory 
mapped files for transient heaps */
+extern size_t GDK_mmap_pagesize __attribute__((__visibility__("hidden"))); /* 
mmap granularity */
 
 #define BATcheck(tst, err)                             \
        do {                                            \
@@ -441,19 +441,19 @@ extern size_t GDK_mmap_pagesize; /* mmap
 /* when the number of updates to a BAT is less than 1 in this number, we
  * keep the unique_est property */
 #define GDK_UNIQUE_ESTIMATE_KEEP_FRACTION      1000
-extern BUN gdk_unique_estimate_keep_fraction; /* should become a define once */
+extern BUN gdk_unique_estimate_keep_fraction 
__attribute__((__visibility__("hidden"))); /* should become a define once */
 /* if the number of unique values is less than 1 in this number, we
  * destroy the hash rather than update it in HASH{append,insert,delete} */
 #define HASH_DESTROY_UNIQUES_FRACTION          1000
-extern BUN hash_destroy_uniques_fraction;     /* likewise */
+extern BUN hash_destroy_uniques_fraction 
__attribute__((__visibility__("hidden")));     /* likewise */
 /* if the estimated number of unique values is less than 1 in this
  * number, don't build a hash table to do a hashselect */
 #define NO_HASH_SELECT_FRACTION                        1000
-extern dbl no_hash_select_fraction;           /* same here */
+extern dbl no_hash_select_fraction __attribute__((__visibility__("hidden")));  
         /* same here */
 /* if the hash chain is longer than this number, we delete the hash
  * rather than maintaining it in HASHdelete */
 #define HASH_DESTROY_CHAIN_LENGTH              1000
-extern BUN hash_destroy_chain_length;
+extern BUN hash_destroy_chain_length __attribute__((__visibility__("hidden")));
 
 extern void (*GDKtriggerusr1)(void);
 
diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h
--- a/gdk/gdk_system.h
+++ b/gdk/gdk_system.h
@@ -33,6 +33,9 @@
 #if !__has_attribute(__constructor__)
 #define __constructor__
 #endif
+#if !__has_attribute(__counted_by__)
+#define __counted_by__(...)
+#endif
 #if !__has_attribute(__designated_init__)
 #define __designated_init__
 #endif
diff --git a/geom/lib/libgeom.h b/geom/lib/libgeom.h
--- a/geom/lib/libgeom.h
+++ b/geom/lib/libgeom.h
@@ -117,7 +117,7 @@ libgeom_export const char *geom_type2str
 typedef struct wkb {
        int len;
        int srid;
-       char data[];
+       char data[] __attribute__((__counted_by__(len)));
 } wkb;
 
 typedef struct {
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -159,7 +159,7 @@ typedef struct INSTR {
        const char *modname;            /* module context, reference into 
namespace */
        const char *fcnname;            /* function name, reference into 
namespace */
        int argc, retc, maxarg;         /* total and result argument count */
-       int argv[];                                     /* at least a few 
entries */
+       int argv[] __attribute__((__counted_by__(maxarg)));     /* at least a 
few entries */
 } *InstrPtr, InstrRecord;
 
 typedef struct MALBLK {
diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -1,25 +1,3 @@
-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');
-
 Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
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
@@ -1,25 +1,3 @@
-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');
-
 Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -84,28 +84,6 @@ update sys.functions set system = true w
 update sys.functions set system = true where system <> true and name = 
'filter' and schema_id = (select id from sys.schemas where name = 'json') and 
type = 1;
 
 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');
-
-Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
 Running database upgrade commands:
diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -1,27 +1,3 @@
-Running database upgrade commands to update system tables.
-
-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');
-
 Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
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
@@ -1,27 +1,3 @@
-Running database upgrade commands to update system tables.
-
-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');
-
 Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
@@ -84,28 +84,6 @@ update sys.functions set system = true w
 update sys.functions set system = true where system <> true and name = 
'filter' and schema_id = (select id from sys.schemas where name = 'json') and 
type = 1;
 
 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');
-
-Running database upgrade commands:
 delete from sys.dependencies where id = 2048 and depend_id = (select f.id from 
sys.functions f where name = 'get_merge_table_partition_expressions');
 
 Running database upgrade commands:
diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -1,25 +1,3 @@
-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,
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to