Changeset: fa37c78ca7db for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fa37c78ca7db
Branch: resource_management
Log Message:
merge with default
diffs (truncated from 4265 to 300 lines):
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -8,9 +8,9 @@
# Copyright August 2008 - 2023 MonetDB B.V.;
# Copyright 1997 - July 2008 CWI.
-# python mksqlwxs.py VERSION BITS PREFIX > PREFIX/MonetDB5-SQL-Installer.wxs
-# "c:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe" -nologo -arch
x64/x86 PREFIX/MonetDB5-SQL-Installer.wxs
-# "c:\Program Files (x86)\WiX Toolset v3.10\bin\light.exe" -nologo -sice:ICE03
-sice:ICE60 -sice:ICE82 -ext WixUIExtension PREFIX/MonetDB5-SQL-Installer.wixobj
+# python mksqlwxs.py VERSION BITS PREFIX > PREFIX/MonetDB-SQL-Installer.wxs
+# "c:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe" -nologo -arch
x64/x86 PREFIX/MonetDB-SQL-Installer.wxs
+# "c:\Program Files (x86)\WiX Toolset v3.10\bin\light.exe" -nologo -sice:ICE03
-sice:ICE60 -sice:ICE82 -ext WixUIExtension PREFIX/MonetDB-SQL-Installer.wixobj
import sys, os
@@ -76,8 +76,8 @@ def main():
pyapi3 = []
print(r'<?xml version="1.0"?>')
print(r'<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">')
- print(r' <Product Id="*" Language="1033" Manufacturer="MonetDB"
Name="MonetDB5" UpgradeCode="{}" Version="{}">'.format(upgradecode[arch],
version))
- print(r' <Package Id="*" Comments="MonetDB5/SQL Server and Client"
Compressed="yes" InstallerVersion="301" Keywords="MonetDB5 MonetDB SQL
Database" Languages="1033" Manufacturer="MonetDB Foundation"
Platform="{}"/>'.format(arch))
+ print(r' <Product Id="*" Language="1033" Manufacturer="MonetDB"
Name="MonetDB" UpgradeCode="{}" Version="{}">'.format(upgradecode[arch],
version))
+ print(r' <Package Id="*" Comments="MonetDB/SQL Server and Client"
Compressed="yes" InstallerVersion="301" Keywords="MonetDB SQL Database"
Languages="1033" Manufacturer="MonetDB Foundation"
Platform="{}"/>'.format(arch))
print(r' <Upgrade Id="{}">'.format(geomupgradecode[arch]))
# up to and including 11.29.3, the geom module can not be
# uninstalled if MonetDB/SQL is not installed; this somehow also
@@ -123,7 +123,7 @@ def main():
print(r' <Property Id="OLDGEOMINSTALLED">')
print(r' <ProductSearch UpgradeCode="{}" Minimum="11.1.1"
Maximum="11.29.3" IncludeMinimum="yes"
IncludeMaximum="yes"/>'.format(geomupgradecode[arch]))
print(r' </Property>')
- print(r' <Condition Message="Please uninstall MonetDB5 SQL GIS Module
first, then rerun and select to install Complete package.">')
+ print(r' <Condition Message="Please uninstall MonetDB SQL GIS Module
first, then rerun and select to install Complete package.">')
print(r' NOT OLDGEOMINSTALLED')
print(r' </Condition>')
print(r' <Property Id="ApplicationFolderName" Value="MonetDB"/>')
@@ -140,7 +140,7 @@ def main():
print(r' <Merge Id="VCRedist" DiskId="1" Language="0"
SourceFile="{}\{}\MergeModules\{}"/>'.format(msvc, d, fn))
print(r' <Directory Id="{}">'.format(folder))
print(r' <Directory Id="ProgramFilesMonetDB" Name="MonetDB">')
- print(r' <Directory Id="INSTALLDIR" Name="MonetDB5">')
+ print(r' <Directory Id="INSTALLDIR" Name="MonetDB">')
print(r' <Component Id="registry">')
print(r' <RegistryKey
Key="Software\[Manufacturer]\[ProductName]" Root="HKLM">')
print(r' <RegistryValue Name="InstallPath" Type="string"
Value="[INSTALLDIR]"/>')
diff --git a/clients/mapilib/Tests/tlssecurity.py
b/clients/mapilib/Tests/tlssecurity.py
--- a/clients/mapilib/Tests/tlssecurity.py
+++ b/clients/mapilib/Tests/tlssecurity.py
@@ -24,7 +24,7 @@ if sys.platform == 'win32':
log_level=logging.DEBUG
if '-v' in sys.argv:
log_level = logging.DEBUG
-#level = logging.DEBUG
+# log_level = logging.DEBUG
logging.basicConfig(level=log_level,format=log_format)
@@ -49,10 +49,14 @@ def attempt(experiment: str, portname: s
url += '?' + '&'.join(f"{k}={v}" for k, v in params.items())
logging.debug(f"**** START TEST {experiment}")
logging.debug(f"Connecting to {url},
expected_error={expected_error_regex}")
- cmd = ['mclient', '-d', url]
+ test_log_file = os.path.join(scratchdir, portname + '.log')
+ cmd = ['mclient', '-d', url, '-L', test_log_file]
logging.debug(f"cmd={cmd}")
proc = subprocess.run(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
logging.debug(f"mclient exited with code {proc.returncode},
err={proc.stderr}")
+ with open(test_log_file, 'r') as f:
+ for line in f:
+ logging.debug(f'mclient log: {line.rstrip()}')
if proc.returncode != 2:
msg = str(proc.stderr, 'utf-8')
print(f"mclient is supposed to exit with status 2, not
{proc.returncode}.\n--- stderr ---\n{msg}\n---end stderr ---", file=sys.stderr)
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -616,6 +616,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
if (!li) { \
/* open range on left */ \
if (vl == MAXVALUE##TYPE) { \
+ *algo = "select: empty range"; \
return 0; \
} \
/* vl < x === vl+1 <= x */ \
@@ -633,6 +634,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
if (!hi) { \
/* open range on right */ \
if (vh == MINVALUE##TYPE) { \
+ *algo = "select: empty range"; \
return 0; \
} \
/* x < vh === x <= vh-1 */ \
@@ -646,6 +648,7 @@ NAME##_##TYPE(BATiter *bi, struct candit
hval = true; \
} \
if (vl > vh) { \
+ *algo = "select: empty range"; \
return 0; \
} \
} \
@@ -898,6 +901,7 @@ fullscan_str(BATiter *bi, struct candite
return 0;
}
if (pos == (var_t) -1) {
+ *algo = NULL;
BBPreclaim(bn);
return BUN_NONE;
}
diff --git a/sql/backends/monet5/sql_upgrades.c
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -240,7 +240,9 @@ sql_update_hugeint(Client c, mvc *sql)
"external name generator.series;\n"
"create function sys.generate_series(first hugeint,
\"limit\" hugeint, stepsize hugeint)\n"
"returns table (value hugeint)\n"
- "external name generator.series;\n");
+ "external name generator.series;\n"
+ "grant execute on function sys.generate_series(hugeint,
hugeint) to public;\n"
+ "grant execute on function sys.generate_series(hugeint,
hugeint, hugeint) to public;\n");
/* 39_analytics_hge.sql */
pos += snprintf(buf + pos, bufsize - pos,
@@ -297,7 +299,19 @@ sql_update_hugeint(Client c, mvc *sql)
"GRANT EXECUTE ON AGGREGATE corr(HUGEINT, HUGEINT) TO
PUBLIC;\n"
"create window corr(e1 HUGEINT, e2 HUGEINT) returns
DOUBLE\n"
" external name \"sql\".\"corr\";\n"
- "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO
PUBLIC;\n");
+ "GRANT EXECUTE ON WINDOW corr(HUGEINT, HUGEINT) TO
PUBLIC;\n"
+ "create aggregate median(val DECIMAL(38)) returns
DECIMAL(38)\n"
+ " external name \"aggr\".\"median\";\n"
+ "GRANT EXECUTE ON AGGREGATE median(DECIMAL(38)) TO
PUBLIC;\n"
+ "create aggregate median_avg(val DECIMAL(38)) returns
DOUBLE\n"
+ " external name \"aggr\".\"median_avg\";\n"
+ "GRANT EXECUTE ON AGGREGATE median_avg(DECIMAL(38)) TO
PUBLIC;\n"
+ "create aggregate quantile(val DECIMAL(38), q DOUBLE)
returns DECIMAL(38)\n"
+ " external name \"aggr\".\"quantile\";\n"
+ "GRANT EXECUTE ON AGGREGATE quantile(DECIMAL(38),
DOUBLE) TO PUBLIC;\n"
+ "create aggregate quantile_avg(val DECIMAL(38), q
DOUBLE) returns DOUBLE\n"
+ " external name \"aggr\".\"quantile_avg\";\n"
+ "GRANT EXECUTE ON AGGREGATE quantile_avg(DECIMAL(38),
DOUBLE) TO PUBLIC;\n");
/* 40_json_hge.sql */
pos += snprintf(buf + pos, bufsize - pos,
@@ -306,9 +320,9 @@ sql_update_hugeint(Client c, mvc *sql)
"GRANT EXECUTE ON FUNCTION json.filter(json, hugeint)
TO PUBLIC;\n");
pos += snprintf(buf + pos, bufsize - pos,
- "update sys.functions set system = true where system <>
true and name in ('generate_series') and schema_id = (select id from
sys.schemas where name = 'sys') and type = %d;\n"
- "update sys.functions set system = true where system <>
true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp',
'var_pop', 'covar_pop', 'median', 'median_avg', 'quantile', 'quantile_avg',
'corr') and schema_id = (select id from sys.schemas where name = 'sys') and
type = %d;\n"
- "update sys.functions set system = true where system <>
true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp',
'var_pop', 'covar_pop', 'corr') and schema_id = (select id from sys.schemas
where name = 'sys') and type = %d;\n"
+ "update sys.functions set system = true where system <>
true and name in ('generate_series') and schema_id = 2000 and type = %d;\n"
+ "update sys.functions set system = true where system <>
true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp',
'var_pop', 'covar_pop', 'median', 'median_avg', 'quantile', 'quantile_avg',
'corr') and schema_id = 2000 and type = %d;\n"
+ "update sys.functions set system = true where system <>
true and name in ('stddev_samp', 'stddev_pop', 'var_samp', 'covar_samp',
'var_pop', 'covar_pop', 'corr') and schema_id = 2000 and type = %d;\n"
"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 = %d;\n",
(int) F_UNION, (int) F_AGGR, (int) F_ANALYTIC, (int)
F_FUNC);
@@ -349,2925 +363,6 @@ sql_drop_shp(Client c)
}
static str
-sql_update_generator(Client c)
-{
- const char query[] = "update sys.args set name = 'limit' where name =
'last' and func_id in (select id from sys.functions where schema_id = 2000 and
name = 'generate_series' and func like '% last %');\n"
- "update sys.functions set func = replace(func, ' last ', '
\"limit\" ') where schema_id = 2000 and name = 'generate_series' and func like
'% last %';\n";
- return SQLstatementIntern(c, query, "update", true, false, NULL);
-}
-
-static str
-sql_drop_functions_dependencies_Xs_on_Ys(Client c)
-{
- size_t bufsize = 1600, pos = 0;
- char *err = NULL, *buf = GDKmalloc(bufsize);
-
- if (buf == NULL)
- throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL);
-
- /* remove functions which were created in
sql/scripts/21_dependency_functions.sql */
- pos += snprintf(buf + pos, bufsize - pos,
- "DROP FUNCTION dependencies_schemas_on_users()
CASCADE;\n"
- "DROP FUNCTION dependencies_owners_on_schemas()
CASCADE;\n"
- "DROP FUNCTION dependencies_tables_on_views()
CASCADE;\n"
- "DROP FUNCTION dependencies_tables_on_indexes()
CASCADE;\n"
- "DROP FUNCTION dependencies_tables_on_triggers()
CASCADE;\n"
- "DROP FUNCTION dependencies_tables_on_foreignKeys()
CASCADE;\n"
- "DROP FUNCTION dependencies_tables_on_functions()
CASCADE;\n"
- "DROP FUNCTION dependencies_columns_on_views()
CASCADE;\n"
- "DROP FUNCTION dependencies_columns_on_keys()
CASCADE;\n"
- "DROP FUNCTION dependencies_columns_on_indexes()
CASCADE;\n"
- "DROP FUNCTION dependencies_columns_on_functions()
CASCADE;\n"
- "DROP FUNCTION dependencies_columns_on_triggers()
CASCADE;\n"
- "DROP FUNCTION dependencies_views_on_functions()
CASCADE;\n"
- "DROP FUNCTION dependencies_views_on_triggers()
CASCADE;\n"
- "DROP FUNCTION dependencies_functions_on_functions()
CASCADE;\n"
- "DROP FUNCTION dependencies_functions_on_triggers()
CASCADE;\n"
- "DROP FUNCTION dependencies_keys_on_foreignKeys()
CASCADE;\n");
-
- assert(pos < bufsize);
-
- printf("Running database upgrade commands:\n%s\n", buf);
- fflush(stdout);
- err = SQLstatementIntern(c, buf, "update", true, false, NULL);
- GDKfree(buf);
- return err; /* usually MAL_SUCCEED */
-}
-
-static str
-sql_update_storagemodel(Client c, mvc *sql, bool oct2020_upgrade)
-{
- size_t bufsize = 20000, pos = 0;
- char *buf, *err;
- sql_schema *s = mvc_bind_schema(sql, "sys");
- sql_table *t;
- char *day_interval_str = oct2020_upgrade ? " 'day_interval'," : "";
-
- if ((buf = GDKmalloc(bufsize)) == NULL)
- throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL);
-
- /* set views and tables internally to non-system to allow drop commands
to succeed without error */
- if ((t = mvc_bind_table(sql, s, "storage")) != NULL)
- t->system = 0;
- if ((t = mvc_bind_table(sql, s, "storagemodel")) != NULL)
- t->system = 0;
- if ((t = mvc_bind_table(sql, s, "storagemodelinput")) != NULL)
- t->system = 0;
- if ((t = mvc_bind_table(sql, s, "tablestoragemodel")) != NULL)
- t->system = 0;
-
- /* new 75_storagemodel.sql */
- pos += snprintf(buf + pos, bufsize - pos,
- /* drop objects in reverse order of original creation of old
75_storagemodel.sql */
- "drop view if exists sys.tablestoragemodel cascade;\n"
- "drop view if exists sys.storagemodel cascade;\n"
- "drop function if exists sys.storagemodel() cascade;\n");
-
- if (oct2020_upgrade) {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.imprintsize(varchar(1024),
bigint) cascade;\n");
- } else {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.imprintsize(bigint, clob)
cascade;\n");
- }
-
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.hashsize(boolean, bigint)
cascade;\n");
-
- if (oct2020_upgrade) {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.columnsize(varchar(1024),
bigint) cascade;\n"
- "drop function if exists sys.heapsize(varchar(1024),
bigint, bigint, int) cascade;\n");
- } else {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.columnsize(clob, bigint,
bigint) cascade;\n"
- "drop function if exists sys.heapsize(clob, bigint,
int) cascade;\n");
- }
-
- pos += snprintf(buf + pos, bufsize - pos,
- "drop procedure if exists sys.storagemodelinit() cascade;\n"
- "drop table if exists sys.storagemodelinput cascade;\n"
- "drop view if exists sys.\"storage\" cascade;\n");
-
- if (oct2020_upgrade) {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.\"storage\"(varchar(1024),
varchar(1024), varchar(1024)) cascade;\n"
- "drop function if exists sys.\"storage\"(varchar(1024),
varchar(1024)) cascade;\n"
- "drop function if exists sys.\"storage\"(varchar(1024))
cascade;\n");
- } else {
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.\"storage\"(clob, clob,
clob) cascade;\n"
- "drop function if exists sys.\"storage\"(clob, clob)
cascade;\n"
- "drop function if exists sys.\"storage\"(clob)
cascade;\n");
- }
-
- /* new 75_storagemodel.sql */
- pos += snprintf(buf + pos, bufsize - pos,
- "drop function if exists sys.\"storage\"() cascade;\n"
- "create function sys.\"storage\"()\n"
- "returns table (\n"
- " \"schema\" varchar(1024),\n"
- " \"table\" varchar(1024),\n"
- " \"column\" varchar(1024),\n"
- " \"type\" varchar(1024),\n"
- " \"mode\" varchar(15),\n"
- " location varchar(1024),\n"
- " \"count\" bigint,\n"
- " typewidth int,\n"
- " columnsize bigint,\n"
- " heapsize bigint,\n"
- " hashes bigint,\n"
- " phash boolean,\n"
- " \"imprints\" bigint,\n"
- " sorted boolean,\n"
- " revsorted boolean,\n"
- " \"unique\" boolean,\n"
- " orderidx bigint\n"
- ")\n"
- "external name sql.\"storage\";\n"
- "create view sys.\"storage\" as\n"
- "select * from sys.\"storage\"()\n"
- " where (\"schema\", \"table\") in (\n"
- " SELECT sch.\"name\", tbl.\"name\"\n"
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]