MonetDB: Dec2023 - add error message on missing or incorrect pas...

2024-05-10 Thread Niels Nes via checkin-list
Changeset: 610ed55e5ac0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/610ed55e5ac0
Modified Files:
sql/backends/monet5/sql.c
sql/test/BugTracker-2024/Tests/All
Branch: Dec2023
Log Message:

add error message on missing or incorrect password hash, fixes #7511. Also 
added small test.


diffs (20 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -5174,6 +5174,8 @@ SQLuser_password(Client cntxt, MalBlkPtr
return msg;
}
*password = monet5_password_hash(m, username);
+   if (!(*password))
+   throw(SQL, "mvc", SQLSTATE(42000) "SELECT: Failed to retrieve 
password hash");
return MAL_SUCCEED;
 }
 
diff --git a/sql/test/BugTracker-2024/Tests/All 
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -52,3 +52,4 @@ orderby-max-over-rows-Bug-7488
 rel2bin_select-Bug-7496
 multicolumn_IN_value_list-Bug-7497
 field-arg-error-Bug-7506
+7511-password-hash-missing-error
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - fixed issue #7513, the uri parsing didn't res...

2024-05-10 Thread Niels Nes via checkin-list
Changeset: a6bcc084ddee for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a6bcc084ddee
Added Files:
sql/test/BugTracker-2024/Tests/7511-password-hash-missing-error.test
sql/test/BugTracker-2024/Tests/7513-uri-authority-parse-issue.test
Modified Files:
monetdb5/modules/atoms/url.c
sql/test/BugTracker-2024/Tests/All
Branch: Dec2023
Log Message:

fixed issue #7513, the uri parsing didn't reset the port after finding the 
username:password@
added tests


diffs (51 lines):

diff --git a/monetdb5/modules/atoms/url.c b/monetdb5/modules/atoms/url.c
--- a/monetdb5/modules/atoms/url.c
+++ b/monetdb5/modules/atoms/url.c
@@ -107,8 +107,10 @@ skip_authority(const char *uri, const ch
port = pass = uri + 1;
else
port = uri + 1;
-   } else if (*uri == '@')
+   } else if (*uri == '@') {
host = uri + 1;
+   port = NULL;
+   }
uri += *uri == '%' ? 3 : 1;
}
if (user == host) {
diff --git 
a/sql/test/BugTracker-2024/Tests/7511-password-hash-missing-error.test 
b/sql/test/BugTracker-2024/Tests/7511-password-hash-missing-error.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7511-password-hash-missing-error.test
@@ -0,0 +1,3 @@
+
+statement error 42000!SELECT: Failed to retrieve password hash
+SELECT PASSWORD_HASH('1');
diff --git a/sql/test/BugTracker-2024/Tests/7513-uri-authority-parse-issue.test 
b/sql/test/BugTracker-2024/Tests/7513-uri-authority-parse-issue.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7513-uri-authority-parse-issue.test
@@ -0,0 +1,15 @@
+
+query T
+SELECT GETHOST('https://me:p...@www.monetdb.org/Doc');
+
+www.monetdb.org
+
+query T
+SELECT GETHOST('https://me:p...@www.monetdb.org/Doc');
+
+www.monetdb.org
+
+query T
+SELECT GETHOST('https://me:p...@www.monetdb.org/Doc');
+
+www.monetdb.org
diff --git a/sql/test/BugTracker-2024/Tests/All 
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -53,3 +53,4 @@ rel2bin_select-Bug-7496
 multicolumn_IN_value_list-Bug-7497
 field-arg-error-Bug-7506
 7511-password-hash-missing-error
+7513-uri-authority-parse-issue
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - fixed bug #7512, protect concurrent instantia...

2024-05-10 Thread Niels Nes via checkin-list
Changeset: 06f20b2c802e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/06f20b2c802e
Added Files:

sql/test/BugTracker-2024/Tests/7512-concurrent-globaltmp-instantiate-crash.test
Modified Files:
sql/scripts/52_describe.sql
sql/storage/sql_catalog.c
sql/storage/store.c
sql/test/BugTracker-2024/Tests/All
Branch: Dec2023
Log Message:

fixed bug #7512, protect concurrent instantiation of the global temps


diffs (99 lines):

diff --git a/sql/scripts/52_describe.sql b/sql/scripts/52_describe.sql
--- a/sql/scripts/52_describe.sql
+++ b/sql/scripts/52_describe.sql
@@ -315,7 +315,6 @@ CREATE VIEW sys.describe_foreign_keys AS
AND ((fkk."action" >> 8) & 255)  = ou.id
ORDER BY fkk.name, fkkc.nr;
 
---TODO: CRASHES when this function gets inlined into describe_tables
 CREATE FUNCTION sys.get_merge_table_partition_expressions(tid INT) RETURNS 
STRING
 BEGIN
RETURN
diff --git a/sql/storage/sql_catalog.c b/sql/storage/sql_catalog.c
--- a/sql/storage/sql_catalog.c
+++ b/sql/storage/sql_catalog.c
@@ -253,13 +253,20 @@ find_sql_table(sql_trans *tr, sql_schema
}
 
if (t && isTempTable(t) && tr->tmp == s) {
+   sqlstore *store = tr->store;
assert(isGlobal(t));
 
sql_table* lt = (sql_table*) os_find_name(tr->localtmps, tr, 
tname);
if (lt)
return lt;
+   MT_lock_set(&store->table_locks[t->base.id&(NR_TABLE_LOCKS-1)]);
 
-   t = globaltmp_instantiate(tr, t);
+   lt = (sql_table*) os_find_name(tr->localtmps, tr, tname);
+   if (!lt)
+   t = globaltmp_instantiate(tr, t);
+   else
+   t = lt;
+   
MT_lock_unset(&store->table_locks[t->base.id&(NR_TABLE_LOCKS-1)]);
return t;
}
 
@@ -276,13 +283,19 @@ find_sql_table_id(sql_trans *tr, sql_sch
}
 
if (t && isTempTable(t) && tr->tmp == s) {
+   sqlstore *store = tr->store;
assert(isGlobal(t));
 
sql_table* lt = (sql_table*) os_find_id(tr->localtmps, tr, id);
if (lt)
return lt;
-
-   t = globaltmp_instantiate(tr, t);
+   MT_lock_set(&store->table_locks[id&(NR_TABLE_LOCKS-1)]);
+   lt = (sql_table*) os_find_id(tr->localtmps, tr, id);
+   if (!lt)
+   t = globaltmp_instantiate(tr, t);
+   else
+   t = lt;
+   MT_lock_unset(&store->table_locks[id&(NR_TABLE_LOCKS-1)]);
return t;
}
return t;
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -3197,9 +3197,6 @@ table_dup(sql_trans *tr, sql_table *ot, 
t->sz = ot->sz;
ATOMIC_PTR_INIT(&t->data, NULL);
 
-   if ((res = os_add(isLocalTemp(t) ? tr->localtmps : t->s->tables, tr, 
t->base.name, &t->base)))
-   goto cleanup;
-
if (isPartitionedByExpressionTable(ot)) {
t->part.pexp = ZNEW(sql_expression);
t->part.pexp->exp =_STRDUP(ot->part.pexp->exp);
@@ -3257,6 +3254,8 @@ table_dup(sql_trans *tr, sql_table *ot, 
ATOMIC_PTR_SET(&t->data, 
store->storage_api.del_dup(ot));
}
}
+   if ((res = os_add(isLocalTemp(t) ? tr->localtmps : t->s->tables, tr, 
t->base.name, &t->base)))
+   goto cleanup;
 
 cleanup:
if (res) {
diff --git 
a/sql/test/BugTracker-2024/Tests/7512-concurrent-globaltmp-instantiate-crash.test
 
b/sql/test/BugTracker-2024/Tests/7512-concurrent-globaltmp-instantiate-crash.test
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2024/Tests/7512-concurrent-globaltmp-instantiate-crash.test
@@ -0,0 +1,5 @@
+statement error conversion of string '' to type int failed.
+SELECT GET_MERGE_TABLE_PARTITION_EXPRESSIONS('')
+
+statement ok
+SELECT GET_MERGE_TABLE_PARTITION_EXPRESSIONS(0)
diff --git a/sql/test/BugTracker-2024/Tests/All 
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -53,4 +53,5 @@ rel2bin_select-Bug-7496
 multicolumn_IN_value_list-Bug-7497
 field-arg-error-Bug-7506
 7511-password-hash-missing-error
+7512-concurrent-globaltmp-instantiate-crash
 7513-uri-authority-parse-issue
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: balanced_union - Handle recursive merge tables

2024-05-10 Thread stefanos mavros via checkin-list
Changeset: f671a61deda1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f671a61deda1
Modified Files:
sql/server/rel_optimizer.c
Branch: balanced_union
Log Message:

Handle recursive merge tables


diffs (23 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -55,6 +55,8 @@ typedef struct {
sql_rel *sel;
 } merge_table_prune_info;
 
+static sql_rel *merge_table_prune_and_unionize(visitor *v, sql_rel *mt_rel, 
merge_table_prune_info *info);
+
 static sql_rel *
 rel_wrap_select_around_mt_child(visitor *v, sql_rel *t, merge_table_prune_info 
*info)
 {
@@ -62,8 +64,8 @@ rel_wrap_select_around_mt_child(visitor 
sql_table *subt = (sql_table *)t->l;
 
if (isMergeTable(subt)) {
-   // TODO: handle it
-   return NULL;
+   if ((t = merge_table_prune_and_unionize(v, t, info)) == NULL)
+   return NULL;
}
 
if (info) {
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: balanced_union - Fixes sqlancer_prepare expected automa...

2024-05-10 Thread stefanos mavros via checkin-list
Changeset: fe0b28876ef9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fe0b28876ef9
Modified Files:
sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
Branch: balanced_union
Log Message:

Fixes sqlancer_prepare expected automatic col naming


diffs (63 lines):

diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 
b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
--- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
+++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
@@ -11,8 +11,8 @@
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 12,  2,  1,  0,  3,  2 # length
-[ "boolean",   1,  0,  "", "%10",  "c0"]
-[ "sec_interval",  13, 0,  "", "%10",  "%1"]
+[ "boolean",   1,  0,  "", "%7",   "c0"]
+[ "sec_interval",  13, 0,  "", "%7",   "%1"]
 [ "boolean",   1,  0,  NULL,   NULL,   NULL]
 [ "sec_interval",  13, 0,  NULL,   NULL,   NULL]
 #ROLLBACK;
@@ -28,8 +28,8 @@
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 7,   2,  1,  0,  3,  3 # length
-[ "decimal",   2,  1,  "", "%22",  "%13"   ]
-[ "int",   31, 0,  "", "%22",  "c2"]
+[ "decimal",   2,  1,  "", "%20",  "%12"   ]
+[ "int",   31, 0,  "", "%20",  "c2"]
 [ "decimal",   2,  1,  NULL,   NULL,   NULL]
 [ "int",   31, 0,  NULL,   NULL,   NULL]
 [ "int",   31, 0,  NULL,   NULL,   NULL]
@@ -75,7 +75,7 @@
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 7,   2,  1,  0,  3,  2 # length
-[ "bigint",63, 0,  "", "%12",  "%4"]
+[ "bigint",63, 0,  "", "%11",  "%4"]
 [ "varchar",   0,  0,  NULL,   NULL,   NULL]
 [ "bigint",63, 0,  NULL,   NULL,   NULL]
 #PREPARE VALUES (CASE WHEN true THEN 5 BETWEEN 4 AND 2 END);
@@ -153,23 +153,23 @@
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 7,   3,  1,  0,  3,  3 # length
-[ "json",  0,  0,  "", "%15",  "%15"   ]
+[ "json",  0,  0,  "", "%14",  "%14"   ]
 [ "hugeint",   127,0,  NULL,   NULL,   NULL]
 % .prepare,.prepare,   .prepare,   .prepare,   .prepare,   
.prepare # table_name
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 7,   3,  1,  0,  3,  3 # length
-[ "json",  0,  0,  "", "%15",  "%15"   ]
+[ "json",  0,  0,  "", "%14",  "%14"   ]
 [ "hugeint",   127,0,  NULL,   NULL,   NULL]
 % .prepare,.prepare,   .prepare,   .prepare,   .prepare,   
.prepare # table_name
 % type,digits, scale,  schema, table,  column # name
 % varchar, int,int,varchar,varchar,varchar # type
 % 7,   1,  1,  0,  3,  3 # length
-[ "varchar",   1,  0,  "", "%22",  "%14"   ]
+[ "varchar",   1,  0,  "", "%20",  "%13"   ]
 [ "varchar",   1,  0,  NULL,   NULL,   NULL]
 [ "boolean",   1,  0,  NULL,   NULL,   NULL]
-% .%22 # table_name
-% %14 # name
+% .%20 # table_name
+% %13 # name
 % varchar # type
 % 1 # length
 [ "b"  ]
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: balanced_union - Expects munion instead of union operator

2024-05-10 Thread stefanos mavros via checkin-list
Changeset: bb72c109e7bd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/bb72c109e7bd
Modified Files:
sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test
Branch: balanced_union
Log Message:

Expects munion instead of union operator


diffs (12 lines):

diff --git a/sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test 
b/sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test
--- a/sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test
+++ b/sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test
@@ -69,7 +69,7 @@ PLAN select count(*) from mt where i >= 
 
 project (
 | group by (
-| | union (
+| | munion (
 | | | group by (
 | | | | select (
 | | | | | table("sys"."sub1") [ "sub1"."i" NOT NULL UNIQUE as "mt"."i" ]
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Dec2023-SP3 was released.

2024-05-10 Thread Sjoerd Mullender via checkin-list
Changeset: 8995a45762ed for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8995a45762ed
Modified Files:
.hgtags
Branch: Dec2023
Log Message:

Dec2023-SP3 was released.


diffs (8 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -826,3 +826,4 @@ dcc8c702e685a4faf21ccf663028d1bc3d1165d1
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_7
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release
 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9
+9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Upgrade code after SQL optimizer fixes which ...

2024-05-10 Thread Sjoerd Mullender via checkin-list
Changeset: 74f83ec971b4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/74f83ec971b4
Modified Files:
sql/backends/monet5/sql_upgrades.c

sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128

sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: Dec2023
Log Message:

Upgrade code after SQL optimizer fixes which find fewer dependencies.


diffs (270 lines):

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
@@ -6594,6 +6594,46 @@ sql_update_dec2023_sp1(Client c, mvc *sq
return err;
 }
 
+static str
+sql_update_dec2023_sp4(Client c, mvc *sql, sql_schema *s)
+{
+   char *err;
+   res_table *output;
+   BAT *b;
+
+   (void) sql;
+   (void) s;
+
+   /* SQL optimizer fixes make that some "dependencies" are no longer
+* dependencies (functions that depend on all columns of a table
+* when it only actually uses a subset of the columns); while we're
+* at it, also fix some ancient dependency changes where view did
+* the same thing (i.e. the second delete will normally not delete
+* anything) */
+   err = SQLstatementIntern(c, "select * from sys.dependencies where (id, 
depend_id) in (select c.id, f.id from sys.functions f, sys._tables t, 
sys._columns c, sys.dependencies d where c.table_id = t.id and f.id = 
d.depend_id and c.id = d.id and f.schema_id = 2000 and t.schema_id = 2000 and 
(f.name, t.name, c.name) in (values ('describe_columns', '_columns', 
'storage')));\n", "update", true, false, &output);
+   if (err)
+   return err;
+   b = BATdescriptor(output->cols[0].b);
+   if (b) {
+   if (BATcount(b) > 0) {
+   const char query[] = "delete from sys.dependencies 
where (id, depend_id) in (select c.id, f.id from sys.functions f, sys._tables 
t, sys._columns c, sys.dependencies d where c.table_id = t.id and f.id = 
d.depend_id and c.id = d.id and f.schema_id = 2000 and t.schema_id = 2000 and 
(f.name, t.name, c.name) in (values ('describe_columns', '_columns', 
'storage'), ('describe_function', 'function_languages', 'language_name'), 
('describe_function', 'function_types', 'function_type_name'), 
('describe_function', 'functions', 'func'), ('describe_function', 'functions', 
'mod'), ('describe_function', 'functions', 'semantics'), ('describe_function', 
'functions', 'side_effect'), ('describe_function', 'functions', 'system'), 
('describe_function', 'functions', 'vararg'), ('describe_function', 
'functions', 'varres'), ('describe_function', 'schemas', 'authorization'), 
('describe_function', 'schemas', 'owner'), ('describe_function', 'schemas', 
'system'), ('describe_table', '_tables', 'access'), ('de
 scribe_table', '_tables', 'commit_action'), ('describe_table', '_tables', 
'system')));\n"
+   "delete from sys.dependencies where (id, 
depend_id) in (select c.id, v.id from sys._tables v, sys._tables t, 
sys._columns c, sys.dependencies d where c.table_id = t.id and v.id = 
d.depend_id and c.id = d.id and v.schema_id = 2000 and t.schema_id = 2000 and 
(v.name, t.name, c.name) in (values ('dependency_columns_on_indexes', 
'_columns', 'name'), ('dependency_columns_on_indexes', '_columns', 'number'), 
('dependency_columns_on_indexes', '_columns', 'storage'), 
('dependency_columns_on_indexes', '_columns', 'table_id'), 
('dependency_columns_on_indexes', '_columns', 'type_digits'), 
('dependency_columns_on_indexes', 'keys', 'id'), 
('dependency_columns_on_indexes', 'triggers', 'name'), 
('dep

MonetDB: default - Add version numbers to selected files names.

2024-05-10 Thread Sjoerd Mullender via checkin-list
Changeset: a8115ccb4014 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a8115ccb4014
Added Files:
clients/NT/mclient.bat.in
clients/NT/msqldump.bat.in
monetdb5/NT/M5server.bat.in
Removed Files:
clients/NT/mclient.bat
clients/NT/msqldump.bat
monetdb5/NT/M5server.bat
Modified Files:
ChangeLog
MonetDB.spec
NT/mkodbcwxs.py
NT/mksqlwxs.py
clients/NT/CMakeLists.txt
clients/mapilib/CMakeLists.txt
clients/mapilib/monetdb-mapi.pc.in
common/stream/CMakeLists.txt
common/stream/monetdb-stream.pc.in
debian/libmonetdb-client-dev.install
debian/libmonetdb-client26.install
debian/libmonetdb-dev.install
debian/libmonetdb-stream-dev.install
debian/libmonetdb-stream26.install
debian/libmonetdb28.install
debian/libmonetdb5-server-cfitsio.install
debian/libmonetdb5-server-geom.install
debian/monetdb-python3.install
debian/monetdb-r.install
debian/monetdb5-server-dev.install
debian/monetdb5-server.install
gdk/CMakeLists.txt
gdk/monetdb-gdk.pc.in
geom/monetdb5/CMakeLists.txt
misc/selinux/monetdb.fc.in
misc/selinux/monetdb.te
monetdb5/NT/CMakeLists.txt
monetdb5/extras/mal_optimizer_template/CMakeLists.txt
monetdb5/extras/rapi/CMakeLists.txt
monetdb5/extras/rapi/rapi.R
monetdb5/extras/rapi/rapi.c
monetdb5/modules/kernel/CMakeLists.txt
monetdb5/tools/CMakeLists.txt
monetdb5/tools/monetdb5.pc.in
sql/backends/monet5/CMakeLists.txt
sql/backends/monet5/UDF/capi/CMakeLists.txt
sql/backends/monet5/UDF/pyapi3/CMakeLists.txt
sql/backends/monet5/UDF/udf/CMakeLists.txt
sql/backends/monet5/generator/CMakeLists.txt
sql/backends/monet5/vaults/csv/CMakeLists.txt
sql/backends/monet5/vaults/fits/CMakeLists.txt
sql/backends/monet5/vaults/netcdf/CMakeLists.txt
sql/backends/monet5/vaults/shp/CMakeLists.txt
tools/mserver/mserver5.c
Branch: default
Log Message:

Add version numbers to selected files names.
This is a step towards being able to have compatibility (i.e. older)
versions installed at the same time.


diffs (truncated from 947 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # This file is updated with Maddlog
 
 * Wed May  8 2024 Sjoerd Mullender 
+- The shared library (.dll aka .so files) now have the version number
+  as part of the name.  This should allow the building of compatibility
+  versions that can be installed in parallel to the latest version.
 - Some of the Debian/Ubuntu packages have been renamed.  The old monetdb5
   names have been changed to plain monetdb, and libmonetdb5-server-*
   packages have been renamed monetdb-*.
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -176,7 +176,7 @@ more client packages.
 %files
 %license COPYING
 %defattr(-,root,root)
-%{_libdir}/libbat.so.*
+%{_libdir}/libbat*.so.*
 
 %package devel
 Summary: MonetDB development files
@@ -202,7 +202,7 @@ functionality of MonetDB.
 %{_includedir}/monetdb/mstring.h
 %exclude %{_includedir}/monetdb/monetdbe.h
 %{_includedir}/monetdb/monet*.h
-%{_libdir}/libbat.so
+%{_libdir}/libbat*.so
 %{_libdir}/pkgconfig/monetdb-gdk.pc
 
 %package stream
@@ -223,7 +223,7 @@ various other components.
 %files stream
 %license COPYING
 %defattr(-,root,root)
-%{_libdir}/libstream.so.*
+%{_libdir}/libstream*.so.*
 
 %package stream-devel
 Summary: MonetDB stream library
@@ -245,7 +245,7 @@ library.
 %files stream-devel
 %defattr(-,root,root)
 %dir %{_includedir}/monetdb
-%{_libdir}/libstream.so
+%{_libdir}/libstream*.so
 %{_includedir}/monetdb/stream.h
 %{_includedir}/monetdb/stream_socket.h
 %{_libdir}/pkgconfig/monetdb-stream.pc
@@ -273,7 +273,7 @@ you will very likely need this package.
 %files client-lib
 %license COPYING
 %defattr(-,root,root)
-%{_libdir}/libmapi.so.*
+%{_libdir}/libmapi*.so.*
 
 %package client
 Summary: MonetDB - Monet Database Management System Client Programs
@@ -298,8 +298,8 @@ MonetDB, you will very likely need this 
 %files client
 %license COPYING
 %defattr(-,root,root)
-%{_bindir}/mclient
-%{_bindir}/msqldump
+%{_bindir}/mclient*
+%{_bindir}/msqldump*
 %{_mandir}/man1/mclient.1*
 %{_mandir}/man1/msqldump.1*
 
@@ -321,7 +321,7 @@ This package contains the files needed t
 %files client-devel
 %defattr(-,root,root)
 %dir %{_includedir}/monetdb
-%{_libdir}/libmapi.so
+%{_libdir}/libmapi*.so
 %{_includedir}/monetdb/mapi*.h
 %{_includedir}/monetdb/msettings.h
 %{_libdir}/pkgconfig/monetdb-mapi.pc
@@ -433,7 +433,7 @@ extensions for %{name}-server.
 
 %files geom
 %defattr(-,root,root)
-%{_libdir}/monetdb5/lib_geom.so
+%{_libdir}/monetdb5*/lib_geom.so
 %endif
 
 %if %{with rintegration}
@@ -457,8 +457,8 @@ install it.
 
 %files R
 %defattr(-,root,root)
-%{_libdir}/mon

MonetDB: default - Merge with Dec2023 branch.

2024-05-10 Thread Sjoerd Mullender via checkin-list
Changeset: 4aab2525d40a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4aab2525d40a
Modified Files:
sql/backends/monet5/sql.c
sql/backends/monet5/sql_upgrades.c
sql/scripts/52_describe.sql
sql/server/rel_optimize_others.c
sql/server/rel_optimizer.c
sql/server/rel_rel.c
sql/server/rel_rel.h
sql/server/rel_select.c
sql/storage/sql_catalog.c
sql/storage/store.c
sql/test/BugTracker-2024/Tests/All
sql/test/Dependencies/Tests/dependency_DBobjects.test
sql/test/Dependencies/Tests/dependency_owner_schema_3.test
sql/test/SQLancer/Tests/sqlancer18.test

sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/sql_dump/Tests/dump.test

sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out
sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: default
Log Message:

Merge with Dec2023 branch.


diffs (truncated from 1220 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -826,3 +826,4 @@ dcc8c702e685a4faf21ccf663028d1bc3d1165d1
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_7
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release
 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9
+9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release
diff --git a/monetdb5/modules/atoms/url.c b/monetdb5/modules/atoms/url.c
--- a/monetdb5/modules/atoms/url.c
+++ b/monetdb5/modules/atoms/url.c
@@ -107,8 +107,10 @@ skip_authority(const char *uri, const ch
port = pass = uri + 1;
else
port = uri + 1;
-   } else if (*uri == '@')
+   } else if (*uri == '@') {
host = uri + 1;
+   port = NULL;
+   }
uri += *uri == '%' ? 3 : 1;
}
if (user == host) {
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -5208,6 +5208,8 @@ SQLuser_password(Client cntxt, MalBlkPtr
return msg;
}
*password = monet5_password_hash(m, username);
+   if (!(*password))
+   throw(SQL, "mvc", SQLSTATE(42000) "SELECT: Failed to retrieve 
password hash");
return MAL_SUCCEED;
 }
 
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
@@ -6596,6 +6596,46 @@ sql_update_dec2023_sp1(Client c, mvc *sq
 }
 
 static str
+sql_update_dec2023_sp4(Client c, mvc *sql, sql_schema *s)
+{
+   char *err;
+   res_table *output;
+   BAT *b;
+
+   (void) sql;
+   (void) s;
+
+   /* SQL optimizer fixes make that some "dependencies" are no longer
+* dependencies (functions that depend on all columns of a table
+* when it only actually uses a subset of the columns); while we're
+* at it, also fix some ancient dependency changes where view did
+* the same thing (i.e. the second delete will normally not delete
+* anything) */
+   err = SQLstatementIn