MonetDB: Jun2023 - Approve upgrades after release.

2023-11-21 Thread Sjoerd Mullender via checkin-list
Changeset: f88a9754ab06 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f88a9754ab06
Modified Files:
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out
Branch: Jun2023
Log Message:

Approve upgrades after release.


diffs (36 lines):

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,5 +0,0 @@
-Running database upgrade commands:
-CREATE FUNCTION timestamp_to_str(d TIMESTAMP, format STRING) RETURNS STRING 
EXTERNAL NAME mtime."timestamp_to_str";
-GRANT EXECUTE ON FUNCTION timestamp_to_str(TIMESTAMP, STRING) TO PUBLIC;
-UPDATE sys.functions SET system = true WHERE system <> true AND name = 
'timestamp_to_str' AND schema_id = 2000 and type = 1;
-
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,5 +0,0 @@
-Running database upgrade commands:
-CREATE FUNCTION timestamp_to_str(d TIMESTAMP, format STRING) RETURNS STRING 
EXTERNAL NAME mtime."timestamp_to_str";
-GRANT EXECUTE ON FUNCTION timestamp_to_str(TIMESTAMP, STRING) TO PUBLIC;
-UPDATE sys.functions SET system = true WHERE system <> true AND name = 
'timestamp_to_str' AND schema_id = 2000 and type = 1;
-
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
@@ -1,5 +0,0 @@
-Running database upgrade commands:
-CREATE FUNCTION timestamp_to_str(d TIMESTAMP, format STRING) RETURNS STRING 
EXTERNAL NAME mtime."timestamp_to_str";
-GRANT EXECUTE ON FUNCTION timestamp_to_str(TIMESTAMP, STRING) TO PUBLIC;
-UPDATE sys.functions SET system = true WHERE system <> true AND name = 
'timestamp_to_str' AND schema_id = 2000 and type = 1;
-
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
@@ -1,5 +0,0 @@
-Running database upgrade commands:
-CREATE FUNCTION timestamp_to_str(d TIMESTAMP, format STRING) RETURNS STRING 
EXTERNAL NAME mtime."timestamp_to_str";
-GRANT EXECUTE ON FUNCTION timestamp_to_str(TIMESTAMP, STRING) TO PUBLIC;
-UPDATE sys.functions SET system = true WHERE system <> true AND name = 
'timestamp_to_str' AND schema_id = 2000 and type = 1;
-
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Adds new test for remote replicas with actual...

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 263e6b2cb218 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/263e6b2cb218
Added Files:
sql/test/rel-optimizers/Tests/remote-replica.py
Branch: default
Log Message:

Adds new test for remote replicas with actuall remote execution


diffs (186 lines):

diff --git a/sql/test/rel-optimizers/Tests/remote-replica.py 
b/sql/test/rel-optimizers/Tests/remote-replica.py
new file mode 100644
--- /dev/null
+++ b/sql/test/rel-optimizers/Tests/remote-replica.py
@@ -0,0 +1,181 @@
+import os, sys, tempfile, pymonetdb
+
+try:
+from MonetDBtesting import process
+except ImportError:
+import process
+
+with tempfile.TemporaryDirectory() as farm_dir:
+os.mkdir(os.path.join(farm_dir, 'master'))
+os.mkdir(os.path.join(farm_dir, 'node2'))
+os.mkdir(os.path.join(farm_dir, 'node3'))
+
+with (
+process.server(mapiport='0', dbname='master',
+   dbfarm=os.path.join(farm_dir, 'master'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_1,
+process.server(mapiport='0', dbname='node2',
+   dbfarm=os.path.join(farm_dir, 'node2'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_2,
+process.server(mapiport='0', dbname='node3',
+   dbfarm=os.path.join(farm_dir, 'node3'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_3
+):
+# create foo_r2 and bar_r2 in node2
+conn2 = pymonetdb.connect(database='node2', port=prc_2.dbport, 
autocommit=True)
+cur2 = conn2.cursor()
+
+cur2.execute("create table foo_r2 (n int, m text)")
+if cur2.execute("insert into foo_r2 values (3, 'replica'), (4, 
'data')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur2.execute("create table bar_r2 (n int, m text)")
+if cur2.execute("insert into bar_r2 values (10, 'alice'), (20, 'bob'), 
(30, 'tom')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur2.execute("create table buz_rmt (l int)")
+if cur2.execute("insert into buz_rmt values (42), (43)") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur2.close()
+conn2.close()
+
+# create foo_r3 and bar_r3 in node3
+conn3 = pymonetdb.connect(database='node3', port=prc_3.dbport, 
autocommit=True)
+cur3 = conn3.cursor()
+
+cur3.execute("create table foo_r3 (n int, m text)")
+if cur3.execute("insert into foo_r3 values (3, 'replica'), (4, 
'data')") != 2:
+sys.stderr.write("2 row inserted expected\n")
+
+cur3.execute("create table bar_r3 (n int, m text)")
+if cur3.execute("insert into bar_r3 values (10, 'alice'), (20, 'bob'), 
(30, 'tom')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur3.close()
+conn3.close()
+
+# create foo_rpl_rmt, bar_rpl_rmt, foo_rpl_rmt_node2 and 
bar_rpl_rmt_node3 on master
+conn1 = pymonetdb.connect(database='master', port=prc_1.dbport, 
autocommit=True)
+cur1 = conn1.cursor()
+
+cur1.execute("create remote table foo_r2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table foo_r3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create replica table foo_rpl_rmt (n int, m text)")
+cur1.execute("alter table foo_rpl_rmt add table foo_r2")
+cur1.execute("alter table foo_rpl_rmt add table foo_r3")
+
+cur1.execute("create remote table bar_r2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table bar_r3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create replica table bar_rpl_rmt (n int, m text)")
+cur1.execute("alter table bar_rpl_rmt add table bar_r2")
+cur1.execute("alter table bar_rpl_rmt add table bar_r3")
+
+cur1.execute("create replica table foo_rpl_rmt_node2 (n int, m text)")
+cur1.execute("alter table foo_rpl_rmt_node2 add table foo_r2")
+
+cur1.execute("create replica table bar_rpl_rmt_node3 (n int, m text)")
+cur1.execute("alter table bar_rpl_rmt_node3 add table bar_r3")
+
+cur1.execute("create remote table buz_rmt (l int) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+
+exp_no_rows = 6
+p = cur1.execute("select * from foo_rpl_rmt, bar_rpl_rmt")
+if p != exp_no_rows:
+sys.stderr.write(f'Expecting {exp_no_rows}: we got {p}\n')
+
+exp_rows = [
+(3, 'replica', 10, 'alice' ),
+(4, 'data', 10, 'alice' ),
+(3, 'replica', 20, 'b

MonetDB: default - Adds assert for tableid in remote body gen

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: c54136c3a55e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c54136c3a55e
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: default
Log Message:

Adds assert for tableid in remote body gen


diffs (11 lines):

diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -356,6 +356,7 @@ static int
InstrPtr curInstr = 0, p, o;
tid_uri *tu = ((list*)prp->value.pval)->h->data;
sqlid table_id = tu->id;
+   assert(table_id);
node *n;
int i, q, v, res = -1, added_to_cache = 0, *lret, *rret;
size_t len = 1024, nr, pwlen = 0;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Lock bat that is being copied, and use locks ...

2023-11-21 Thread Sjoerd Mullender via checkin-list
Changeset: 22920f7834f2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/22920f7834f2
Modified Files:
gdk/ChangeLog.Jun2023
gdk/gdk.h
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_heap.c
gdk/gdk_string.c
Branch: Jun2023
Log Message:

Lock bat that is being copied, and use locks higher up when updating.
This solves a rare race condition.


diffs (162 lines):

diff --git a/gdk/ChangeLog.Jun2023 b/gdk/ChangeLog.Jun2023
--- a/gdk/ChangeLog.Jun2023
+++ b/gdk/ChangeLog.Jun2023
@@ -1,3 +1,9 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
+* Tue Nov 21 2023 Sjoerd Mullender 
+- Fixed a (rare) race condition between copying a bat (COLcopy) and
+  updates happening in parallel to that same bat.  This may only be
+  an actual problem with string bats, and then only in very particular
+  circumstances.
+
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1730,7 +1730,10 @@ tfastins_nocheckVAR(BAT *b, BUN p, const
gdk_return rc;
assert(b->tbaseoff == 0);
assert(b->theap->parentid == b->batCacheid);
-   if ((rc = ATOMputVAR(b, &d, v)) != GDK_SUCCEED)
+   MT_lock_set(&b->theaplock);
+   rc = ATOMputVAR(b, &d, v);
+   MT_lock_unset(&b->theaplock);
+   if (rc != GDK_SUCCEED)
return rc;
if (b->twidth < SIZEOF_VAR_T &&
(b->twidth <= 2 ? d - GDK_VAROFFSET : d) >= ((size_t) 1 << (8 << 
b->tshift))) {
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -827,7 +827,8 @@ COLcopy(BAT *b, int tt, bool writable, r
return NULL;
}
 
-   bi = bat_iterator(b);
+   MT_lock_set(&b->theaplock);
+   bi = bat_iterator_nolock(b);
 
/* first try case (1); create a view, possibly with different
 * atom-types */
@@ -837,9 +838,9 @@ COLcopy(BAT *b, int tt, bool writable, r
ATOMstorage(b->ttype) != TYPE_msk && /* no view on TYPE_msk */
(!VIEWtparent(b) ||
 BBP_desc(VIEWtparent(b))->batRestricted == BAT_READ)) {
+   MT_lock_unset(&b->theaplock);
bn = VIEWcreate(b->hseqbase, b);
if (bn == NULL) {
-   bat_iterator_end(&bi);
return NULL;
}
if (tt != bn->ttype) {
@@ -852,6 +853,7 @@ COLcopy(BAT *b, int tt, bool writable, r
}
bn->tseqbase = ATOMtype(tt) == TYPE_oid ? bi.tseq : 
oid_nil;
}
+   return bn;
} else {
/* check whether we need case (4); BUN-by-BUN copy (by
 * setting slowcopy to false) */
@@ -878,7 +880,7 @@ COLcopy(BAT *b, int tt, bool writable, r
 
bn = COLnew2(b->hseqbase, tt, bi.count, role, bi.width);
if (bn == NULL) {
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
return NULL;
}
if (bn->tvheap != NULL && bn->tvheap->base == NULL) {
@@ -1021,10 +1023,10 @@ COLcopy(BAT *b, int tt, bool writable, r
bn->batRestricted = BAT_READ;
TRC_DEBUG(ALGO, ALGOBATFMT " -> " ALGOBATFMT "\n",
  ALGOBATPAR(b), ALGOBATPAR(bn));
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
return bn;
   bunins_failed:
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
BBPreclaim(bn);
return NULL;
 }
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1320,7 +1320,10 @@ BATappend_or_update(BAT *b, BAT *p, cons
default:
MT_UNREACHABLE();
}
-   if (ATOMreplaceVAR(b, &d, new) != GDK_SUCCEED) {
+   MT_lock_set(&b->theaplock);
+   gdk_return rc = ATOMreplaceVAR(b, &d, new);
+   MT_lock_unset(&b->theaplock);
+   if (rc != GDK_SUCCEED) {
goto bailout;
}
if (b->twidth < SIZEOF_VAR_T &&
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -1190,15 +1190,12 @@ HEAP_malloc(BAT *b, size_t nbytes)
 
/* Increase the size of the heap. */
TRC_DEBUG(HEAP, "HEAPextend in HEAP_malloc %s %zu %zu\n", 
heap->filename, heap->size, newsize);
-   MT_lock_set(&b->theaplock);
if (HEAPgrow(&b->tvheap, newsize, false) != GDK_SUCCEED) {
-   MT_lock_unset(&b->theaplock);
return (var_t) -1;
}
heap = b->tvheap;
heap->free = newsize;
heap->dirty = true;
-   MT_lock_unset(&b->theaplock);
hheader = HEAP_index(heap, 0, HEADE

MonetDB: Dec2023 - Merge with Jun2023 branch.

2023-11-21 Thread Sjoerd Mullender via checkin-list
Changeset: 7797ec88f7e1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7797ec88f7e1
Modified Files:
gdk/gdk.h
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_heap.c
gdk/gdk_string.c
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out
Branch: Dec2023
Log Message:

Merge with Jun2023 branch.


diffs (210 lines):

diff --git a/gdk/ChangeLog.Jun2023 b/gdk/ChangeLog.Jun2023
--- a/gdk/ChangeLog.Jun2023
+++ b/gdk/ChangeLog.Jun2023
@@ -1,3 +1,9 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
+* Tue Nov 21 2023 Sjoerd Mullender 
+- Fixed a (rare) race condition between copying a bat (COLcopy) and
+  updates happening in parallel to that same bat.  This may only be
+  an actual problem with string bats, and then only in very particular
+  circumstances.
+
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1742,7 +1742,10 @@ tfastins_nocheckVAR(BAT *b, BUN p, const
gdk_return rc;
assert(b->tbaseoff == 0);
assert(b->theap->parentid == b->batCacheid);
-   if ((rc = ATOMputVAR(b, &d, v)) != GDK_SUCCEED)
+   MT_lock_set(&b->theaplock);
+   rc = ATOMputVAR(b, &d, v);
+   MT_lock_unset(&b->theaplock);
+   if (rc != GDK_SUCCEED)
return rc;
if (b->twidth < SIZEOF_VAR_T &&
(b->twidth <= 2 ? d - GDK_VAROFFSET : d) >= ((size_t) 1 << (8 << 
b->tshift))) {
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -812,7 +812,8 @@ COLcopy(BAT *b, int tt, bool writable, r
return NULL;
}
 
-   bi = bat_iterator(b);
+   MT_lock_set(&b->theaplock);
+   bi = bat_iterator_nolock(b);
 
/* first try case (1); create a view, possibly with different
 * atom-types */
@@ -822,9 +823,9 @@ COLcopy(BAT *b, int tt, bool writable, r
ATOMstorage(b->ttype) != TYPE_msk && /* no view on TYPE_msk */
(!VIEWtparent(b) ||
 BBP_desc(VIEWtparent(b))->batRestricted == BAT_READ)) {
+   MT_lock_unset(&b->theaplock);
bn = VIEWcreate(b->hseqbase, b);
if (bn == NULL) {
-   bat_iterator_end(&bi);
return NULL;
}
if (tt != bn->ttype) {
@@ -837,6 +838,7 @@ COLcopy(BAT *b, int tt, bool writable, r
}
bn->tseqbase = ATOMtype(tt) == TYPE_oid ? bi.tseq : 
oid_nil;
}
+   return bn;
} else {
/* check whether we need case (4); BUN-by-BUN copy (by
 * setting slowcopy to false) */
@@ -863,7 +865,7 @@ COLcopy(BAT *b, int tt, bool writable, r
 
bn = COLnew2(b->hseqbase, tt, bi.count, role, bi.width);
if (bn == NULL) {
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
return NULL;
}
if (bn->tvheap != NULL && bn->tvheap->base == NULL) {
@@ -1006,10 +1008,10 @@ COLcopy(BAT *b, int tt, bool writable, r
bn->batRestricted = BAT_READ;
TRC_DEBUG(ALGO, ALGOBATFMT " -> " ALGOBATFMT "\n",
  ALGOBATPAR(b), ALGOBATPAR(bn));
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
return bn;
   bunins_failed:
-   bat_iterator_end(&bi);
+   MT_lock_unset(&b->theaplock);
BBPreclaim(bn);
return NULL;
 }
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1392,7 +1392,10 @@ BATappend_or_update(BAT *b, BAT *p, cons
default:
MT_UNREACHABLE();
}
-   if (ATOMreplaceVAR(b, &d, new) != GDK_SUCCEED) {
+   MT_lock_set(&b->theaplock);
+   gdk_return rc = ATOMreplaceVAR(b, &d, new);
+   MT_lock_unset(&b->theaplock);
+   if (rc != GDK_SUCCEED) {
goto bailout;
}
if (b->twidth < SIZEOF_VAR_T &&
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -1185,15 +1185,12 @@ HEAP_malloc(BAT *b, size_t nbytes)
 
/* Increase the size of the heap. */
TRC_DEBUG(HEAP, "HEAPextend in HEAP_malloc %s %zu %zu\n", 
heap->filename, heap->size, newsize);
-   MT_lock_set(&b->theaplock);
if (HEAPgrow(&b->tvheap, newsize, false) != GDK_SUCCEED) {
-   MT_lock_unset(&b->theaplock);
return (var_t) -1;
}
heap = b->tvheap;
heap->free = newsize;

MonetDB: default - Merge with Dec2023 branch.

2023-11-21 Thread Sjoerd Mullender via checkin-list
Changeset: 80b3e449ac79 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/80b3e449ac79
Branch: default
Log Message:

Merge with Dec2023 branch.


diffs (truncated from 2126 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -817,3 +817,4 @@ e6eb06773c17035954ac5d001cfe1f09ff3425cc
 5683fd900f28d65ad7c98d1ed1efd992023a7fa4 Jun2023_15
 c5b17681b55e6ca155db28be59913699e561502a Dec2023_root
 c9e6096e7519636a4e840c7a0c2e27cccb7dc0fe Jun2023_17
+c9e6096e7519636a4e840c7a0c2e27cccb7dc0fe Jun2023_SP3_release
diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -3784,11 +3784,6 @@ command bat.getName(X_0:bat[:any_1]):str
 BKCgetBBPname;
 Gives back the logical name of a BAT.
 bat
-getRole
-command bat.getRole(X_0:bat[:any_1]):str 
-BKCgetRole;
-Returns the rolename of the head column of a BAT.
-bat
 getSequenceBase
 command bat.getSequenceBase(X_0:bat[:any_1]):oid 
 BKCgetSequenceBase;
@@ -4039,11 +4034,6 @@ command bat.setAccess(X_0:bat[:any_1], X
 BKCsetAccess;
 Try to change the update access privileges @to this BAT. Mode:@r[ead-only] 
 - allow only read access.@a[append-only]   - allow reads and 
update.@w[riteable]  - allow all operations.@BATs are updatable by default. 
On making a BAT read-only, @all subsequent updates fail with an error 
message.@Returns the BAT itself.
 bat
-setColumn
-command bat.setColumn(X_0:bat[:any_1], X_1:str):void 
-BKCsetColumn;
-Give a logical name to the tail column of a BAT.
-bat
 setHash
 command bat.setHash(X_0:bat[:any_1]):bit 
 BKCsetHash;
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -3219,11 +3219,6 @@ command bat.getName(X_0:bat[:any_1]):str
 BKCgetBBPname;
 Gives back the logical name of a BAT.
 bat
-getRole
-command bat.getRole(X_0:bat[:any_1]):str 
-BKCgetRole;
-Returns the rolename of the head column of a BAT.
-bat
 getSequenceBase
 command bat.getSequenceBase(X_0:bat[:any_1]):oid 
 BKCgetSequenceBase;
@@ -3464,11 +3459,6 @@ command bat.setAccess(X_0:bat[:any_1], X
 BKCsetAccess;
 Try to change the update access privileges @to this BAT. Mode:@r[ead-only] 
 - allow only read access.@a[append-only]   - allow reads and 
update.@w[riteable]  - allow all operations.@BATs are updatable by default. 
On making a BAT read-only, @all subsequent updates fail with an error 
message.@Returns the BAT itself.
 bat
-setColumn
-command bat.setColumn(X_0:bat[:any_1], X_1:str):void 
-BKCsetColumn;
-Give a logical name to the tail column of a BAT.
-bat
 setHash
 command bat.setHash(X_0:bat[:any_1]):bit 
 BKCsetHash;
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -187,7 +187,6 @@ gdk_return BATreplace(BAT *b, BAT *p, BA
 gdk_return BATreplacepos(BAT *b, const oid *positions, BAT *n, bool autoincr, 
bool force) __attribute__((__warn_unused_result__));
 void BATrmprop(BAT *b, enum prop_t idx);
 void BATrmprop_nolock(BAT *b, enum prop_t idx);
-gdk_return BATroles(BAT *b, const char *tnme);
 gdk_return BATrtree(BAT *wkb, BAT *mbr);
 BAT *BATsample(BAT *b, BUN n);
 BAT *BATsample_with_seed(BAT *b, BUN n, uint64_t seed);
@@ -570,7 +569,7 @@ void *mdlopen(const char *library, int m
 const char *mercurial_revision(void) __attribute__((__const__));
 int mo_add_option(opt **Set, int setlen, opt_kind kind, const char *name, 
const char *value);
 int mo_builtin_settings(opt **Set);
-char *mo_find_option(opt *set, int setlen, const char *name);
+const char *mo_find_option(opt *set, int setlen, const char *name);
 void mo_free_options(opt *set, int setlen);
 void mo_print_options(opt *set, int setlen);
 int mo_system_config(opt **Set, int setlen);
@@ -720,7 +719,7 @@ const char *mcrypt_getHashAlgorithms(voi
 char *mcrypt_hashPassword(const char *algo, const char *password, const char 
*challenge);
 int mo_add_option(opt **Set, int setlen, opt_kind kind, const char *name, 
const char *value);
 int mo_builtin_settings(opt **Set);
-char *mo_find_option(opt *set, int setlen, const char *name);
+const char *mo_find_option(opt *set, int setlen, const char *name);
 void mo_free_options(opt *set, int setlen);
 void mo_print_options(opt *set, int setlen);
 int mo_system_config(opt **Set, int setlen);
@@ -810,7 +809,6 @@ int UTF8_strwidth(const char *restrict s
 void addMalException(MalBlkPtr mb, str msg);
 str addOptimizerPipe(Client cntxt, MalBlkPtr mb, const char *name);
 str addPipeDefinition(Client cntxt, const char *name, const char *pipe);
-void addtoMalBlkHistory(MalBlkPtr mb);
 const char *affectedRowsRef;
 const char *aggrRef;
 const char *alarmRef;
@@ -982,8 +980,6 @@ Symbol getFunctionSymbol(Module scope, I
 int getHgeConstant(MalBlkPtr mb, hge val);
 int getIntConstant(MalBlkPtr mb, int val);

MonetDB: Dec2023 - Adds actual query execution in local replicas...

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 2f4a9831f4a2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2f4a9831f4a2
Modified Files:
sql/test/rel-optimizers/Tests/local-replica.test
sql/test/rel-optimizers/Tests/replicas-base.test
Branch: Dec2023
Log Message:

Adds actual query execution in local replicas test


diffs (62 lines):

diff --git a/sql/test/rel-optimizers/Tests/local-replica.test 
b/sql/test/rel-optimizers/Tests/local-replica.test
--- a/sql/test/rel-optimizers/Tests/local-replica.test
+++ b/sql/test/rel-optimizers/Tests/local-replica.test
@@ -28,6 +28,46 @@ project (
 | ) [  ]
 ) [ "foo_rpl_loc"."n", "foo_rpl_loc"."m", "bar_rpl_loc"."n", "bar_rpl_loc"."m" 
]
 
+query ITIT rowsort
+select * from foo_rpl_loc, bar_rpl_loc
+
+1
+hello
+10
+alice
+1
+hello
+20
+bob
+1
+hello
+30
+tom
+2
+world
+10
+alice
+2
+world
+20
+bob
+2
+world
+30
+tom
+3
+!!
+10
+alice
+3
+!!
+20
+bob
+3
+!!
+30
+tom
+
 query T nosort
 plan select * from foo_rpl_loc, buz_rmt
 
diff --git a/sql/test/rel-optimizers/Tests/replicas-base.test 
b/sql/test/rel-optimizers/Tests/replicas-base.test
--- a/sql/test/rel-optimizers/Tests/replicas-base.test
+++ b/sql/test/rel-optimizers/Tests/replicas-base.test
@@ -15,7 +15,7 @@ statement ok
 create table bar_local (n int, m text)
 
 statement ok
-insert into bar_local values (10, 'alice'), (2, 'bob'), (3, 'tom'), (4, 
'jerry')
+insert into bar_local values (10, 'alice'), (20, 'bob'), (30, 'tom')
 
 statement ok
 create remote table bar_r2 (n int, m text) on 
'mapi:monetdb://localhost:50002/node2'
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Adds test for local-replica with actual remote

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 59ce33fa74eb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/59ce33fa74eb
Added Files:
sql/test/rel-optimizers/Tests/local-replica-with-actual-remote.py
Modified Files:
sql/test/rel-optimizers/Tests/All
Branch: Dec2023
Log Message:

Adds test for local-replica with actual remote


diffs (90 lines):

diff --git a/sql/test/rel-optimizers/Tests/All 
b/sql/test/rel-optimizers/Tests/All
--- a/sql/test/rel-optimizers/Tests/All
+++ b/sql/test/rel-optimizers/Tests/All
@@ -5,4 +5,5 @@ join-merge-remote-replica
 replicas-base
 replicas-join
 local-replica
+local-replica-with-actual-remote
 remote-replica
diff --git a/sql/test/rel-optimizers/Tests/local-replica-with-actual-remote.py 
b/sql/test/rel-optimizers/Tests/local-replica-with-actual-remote.py
new file mode 100644
--- /dev/null
+++ b/sql/test/rel-optimizers/Tests/local-replica-with-actual-remote.py
@@ -0,0 +1,76 @@
+import os, sys, tempfile, pymonetdb
+
+try:
+from MonetDBtesting import process
+except ImportError:
+import process
+
+with tempfile.TemporaryDirectory() as farm_dir:
+os.mkdir(os.path.join(farm_dir, 'master'))
+os.mkdir(os.path.join(farm_dir, 'node2'))
+os.mkdir(os.path.join(farm_dir, 'node3'))
+
+with (
+process.server(mapiport='0', dbname='master',
+   dbfarm=os.path.join(farm_dir, 'master'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_1,
+process.server(mapiport='0', dbname='node2',
+   dbfarm=os.path.join(farm_dir, 'node2'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_2
+):
+# create buz_rmt in node2
+conn2 = pymonetdb.connect(database='node2', port=prc_2.dbport, 
autocommit=True)
+cur2 = conn2.cursor()
+
+cur2.execute("create table buz_rmt (l int)")
+if cur2.execute("insert into buz_rmt values (10), (20), (30) ") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur2.close()
+conn2.close()
+
+# create foo_rpl_loc and remote buz_rmt on master
+conn1 = pymonetdb.connect(database='master', port=prc_1.dbport, 
autocommit=True)
+cur1 = conn1.cursor()
+
+cur1.execute("create table foo_local (n int, m text)")
+if cur1.execute("insert into foo_local values (1, 'hello'), (2, 
'world'), (3, '!!')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur1.execute("create remote table buz_rmt (l int) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+
+exp_no_rows = 9
+p = cur1.execute("select * from foo_local, buz_rmt")
+if p != exp_no_rows:
+sys.stderr.write(f'Expecting {exp_no_rows}: we got {p}\n')
+
+exp_rows = [
+(1, 'hello', 10),
+(1, 'hello', 20),
+(1, 'hello', 30),
+(2, 'world', 10),
+(2, 'world', 20),
+(2, 'world', 30),
+(3, '!!', 10),
+(3, '!!', 20),
+(3, '!!', 30)
+]
+res = cur1.fetchall()
+for r in res:
+if r not in exp_rows:
+sys.stderr.write(f'Result row {r} is not expected\n')
+else:
+exp_rows.remove(r)
+
+if len(exp_rows) != 0:
+sys.stderr.write(f'Some expected results where not detected:\n')
+for r in exp_rows:
+sys.stderr.write(str(r)+'\n')
+
+cur1.close()
+conn1.close()
+
+prc_1.communicate()
+prc_2.communicate()
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Adds query for execution on replicas test

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 34a03dfb456c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/34a03dfb456c
Modified Files:
sql/test/rel-optimizers/Tests/replicas-join-plan.test
Branch: Dec2023
Log Message:

Adds query for execution on replicas test


diffs (52 lines):

diff --git a/sql/test/rel-optimizers/Tests/replicas-join-plan.test 
b/sql/test/rel-optimizers/Tests/replicas-join-plan.test
--- a/sql/test/rel-optimizers/Tests/replicas-join-plan.test
+++ b/sql/test/rel-optimizers/Tests/replicas-join-plan.test
@@ -39,6 +39,48 @@ project (
 | ) [  ]
 ) [ "foo_rpl"."n", "foo_rpl"."m", "bar_rpl"."n", "bar_rpl"."m" ]
 
+# we can execute this test because we are not expecting any data send to
+# any remote. the crossproduct is going to be executed locally
+query ITIT rowsort
+select * from foo_rpl, bar_rpl
+
+1
+hello
+10
+alice
+1
+hello
+20
+bob
+1
+hello
+30
+tom
+2
+world
+10
+alice
+2
+world
+20
+bob
+2
+world
+30
+tom
+3
+!!
+10
+alice
+3
+!!
+20
+bob
+3
+!!
+30
+tom
+
 # In the next test and given the implentation of the remote optimizer we 
 # expect the replicas to be resolved to the remote tables. The optimizer 
 # could be in principle be adapted to resolve the replica crossproduct
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Adds new test for replicas-join with actual r...

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 7d94c23d346b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7d94c23d346b
Added Files:
sql/test/rel-optimizers/Tests/replicas-join.py
Branch: Dec2023
Log Message:

Adds new test for replicas-join with actual remotes


diffs (154 lines):

diff --git a/sql/test/rel-optimizers/Tests/replicas-join.py 
b/sql/test/rel-optimizers/Tests/replicas-join.py
new file mode 100644
--- /dev/null
+++ b/sql/test/rel-optimizers/Tests/replicas-join.py
@@ -0,0 +1,149 @@
+import os, sys, tempfile, pymonetdb
+
+try:
+from MonetDBtesting import process
+except ImportError:
+import process
+
+with tempfile.TemporaryDirectory() as farm_dir:
+os.mkdir(os.path.join(farm_dir, 'master'))
+os.mkdir(os.path.join(farm_dir, 'node2'))
+os.mkdir(os.path.join(farm_dir, 'node3'))
+
+with (
+process.server(mapiport='0', dbname='master',
+   dbfarm=os.path.join(farm_dir, 'master'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_1,
+process.server(mapiport='0', dbname='node2',
+   dbfarm=os.path.join(farm_dir, 'node2'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_2,
+process.server(mapiport='0', dbname='node3',
+   dbfarm=os.path.join(farm_dir, 'node3'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_3
+):
+# create foo_p2 and members_n2 in node2
+conn2 = pymonetdb.connect(database='node2', port=prc_2.dbport, 
autocommit=True)
+cur2 = conn2.cursor()
+
+cur2.execute("create table foo_p2 (n int, m text)")
+if cur2.execute("insert into foo_p2 values (1, 'hello'), (2, 
'world')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur2.execute("create table bar_r2 (n int, m text)")
+if cur2.execute("insert into bar_r2 values (10, 'alice'), (20, 'bob'), 
(30, 'tom')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur2.execute("create table buz_rmt (l int)")
+if cur2.execute("insert into buz_rmt values (42), (43)") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur2.close()
+conn2.close()
+
+# create foo_p2 and members_n2 in node2
+conn3 = pymonetdb.connect(database='node3', port=prc_3.dbport, 
autocommit=True)
+cur3 = conn3.cursor()
+
+cur3.execute("create table foo_p3 (n int, m text)")
+if cur3.execute("insert into foo_p3 values (1, 'hello'), (2, 
'world')") != 2:
+sys.stderr.write("2 row inserted expected\n")
+
+cur3.execute("create table bar_r3 (n int, m text)")
+if cur3.execute("insert into bar_r3 values (10, 'alice'), (20, 'bob'), 
(30, 'tom')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur3.close()
+conn3.close()
+
+# create foo_rpl and bar_rpl on master
+conn1 = pymonetdb.connect(database='master', port=prc_1.dbport, 
autocommit=True)
+cur1 = conn1.cursor()
+
+cur1.execute("create table foo_local (n int, m text)")
+if cur1.execute("insert into foo_local values (1, 'hello'), (2, 
'world')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+cur1.execute("create remote table foo_p2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table foo_p3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create replica table foo_rpl (n int, m text)")
+cur1.execute("alter table foo_rpl add table foo_local")
+cur1.execute("alter table foo_rpl add table foo_p2")
+cur1.execute("alter table foo_rpl add table foo_p3")
+
+cur1.execute("create table bar_local (n int, m text)")
+if cur1.execute("insert into bar_local values (10, 'alice'), (20, 
'bob'), (30, 'tom')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+cur1.execute("create remote table bar_r2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table bar_r3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create replica table bar_rpl (n int, m text)")
+cur1.execute("alter table bar_rpl add table bar_local")
+cur1.execute("alter table bar_rpl add table bar_r2")
+cur1.execute("alter table bar_rpl add table bar_r3")
+
+cur1.execute("create remote table buz_rmt (l int) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+
+exp_no_rows = 6
+p = cur1.execute("select * from foo_rpl, bar_rpl")
+if p != exp_no_rows:
+sys.stderr.write(f'Expec

MonetDB: Dec2023 - Renames replicas test

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: dc1b4054c35b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dc1b4054c35b
Added Files:
sql/test/rel-optimizers/Tests/replicas-join-plan.reqtests
sql/test/rel-optimizers/Tests/replicas-join-plan.test
Removed Files:
sql/test/rel-optimizers/Tests/replicas-join.reqtests
sql/test/rel-optimizers/Tests/replicas-join.test
Modified Files:
sql/test/rel-optimizers/Tests/All
Branch: Dec2023
Log Message:

Renames replicas test


diffs (18 lines):

diff --git a/sql/test/rel-optimizers/Tests/All 
b/sql/test/rel-optimizers/Tests/All
--- a/sql/test/rel-optimizers/Tests/All
+++ b/sql/test/rel-optimizers/Tests/All
@@ -3,7 +3,7 @@ groupby-cse
 groupjoin
 join-merge-remote-replica
 replicas-base
-replicas-join
+replicas-join-plan
 local-replica
 local-replica-with-actual-remote
 remote-replica
diff --git a/sql/test/rel-optimizers/Tests/replicas-join.reqtests 
b/sql/test/rel-optimizers/Tests/replicas-join-plan.reqtests
rename from sql/test/rel-optimizers/Tests/replicas-join.reqtests
rename to sql/test/rel-optimizers/Tests/replicas-join-plan.reqtests
diff --git a/sql/test/rel-optimizers/Tests/replicas-join.test 
b/sql/test/rel-optimizers/Tests/replicas-join-plan.test
rename from sql/test/rel-optimizers/Tests/replicas-join.test
rename to sql/test/rel-optimizers/Tests/replicas-join-plan.test
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Renames remote replica tests

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 494b6555d09c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/494b6555d09c
Added Files:
sql/test/rel-optimizers/Tests/remote-replica-plan.reqtests
sql/test/rel-optimizers/Tests/remote-replica-plan.test
Removed Files:
sql/test/rel-optimizers/Tests/remote-replica.reqtests
sql/test/rel-optimizers/Tests/remote-replica.test
Branch: Dec2023
Log Message:

Renames remote replica tests


diffs (6 lines):

diff --git a/sql/test/rel-optimizers/Tests/remote-replica.reqtests 
b/sql/test/rel-optimizers/Tests/remote-replica-plan.reqtests
rename from sql/test/rel-optimizers/Tests/remote-replica.reqtests
rename to sql/test/rel-optimizers/Tests/remote-replica-plan.reqtests
diff --git a/sql/test/rel-optimizers/Tests/remote-replica.test 
b/sql/test/rel-optimizers/Tests/remote-replica-plan.test
rename from sql/test/rel-optimizers/Tests/remote-replica.test
rename to sql/test/rel-optimizers/Tests/remote-replica-plan.test
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Adds assert for tableid in remote body gen

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 876df192e2ed for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/876df192e2ed
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: Dec2023
Log Message:

Adds assert for tableid in remote body gen


diffs (11 lines):

diff --git a/sql/backends/monet5/sql_gencode.c 
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -356,6 +356,7 @@ static int
InstrPtr curInstr = 0, p, o;
tid_uri *tu = ((list*)prp->value.pval)->h->data;
sqlid table_id = tu->id;
+   assert(table_id);
node *n;
int i, q, v, res = -1, added_to_cache = 0, *lret, *rret;
size_t len = 1024, nr, pwlen = 0;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Adds test for joining remote merge table with...

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: f5ff6eb95f26 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f5ff6eb95f26
Added Files:
sql/test/rel-optimizers/Tests/join-merge-remote-replica.py
Modified Files:
sql/test/rel-optimizers/Tests/All
Branch: Dec2023
Log Message:

Adds test for joining remote merge table with replicas


diffs (140 lines):

diff --git a/sql/test/rel-optimizers/Tests/All 
b/sql/test/rel-optimizers/Tests/All
--- a/sql/test/rel-optimizers/Tests/All
+++ b/sql/test/rel-optimizers/Tests/All
@@ -1,6 +1,7 @@
 split-select
 groupby-cse
 groupjoin
+join-merge-remote-replica-plan
 join-merge-remote-replica
 replicas-base
 replicas-join-plan
diff --git a/sql/test/rel-optimizers/Tests/join-merge-remote-replica.py 
b/sql/test/rel-optimizers/Tests/join-merge-remote-replica.py
new file mode 100644
--- /dev/null
+++ b/sql/test/rel-optimizers/Tests/join-merge-remote-replica.py
@@ -0,0 +1,124 @@
+import os, sys, tempfile, pymonetdb
+
+try:
+from MonetDBtesting import process
+except ImportError:
+import process
+
+with tempfile.TemporaryDirectory() as farm_dir:
+os.mkdir(os.path.join(farm_dir, 'master'))
+os.mkdir(os.path.join(farm_dir, 'node2'))
+os.mkdir(os.path.join(farm_dir, 'node3'))
+
+with (
+process.server(mapiport='0', dbname='master',
+   dbfarm=os.path.join(farm_dir, 'master'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_1,
+process.server(mapiport='0', dbname='node2',
+   dbfarm=os.path.join(farm_dir, 'node2'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_2,
+process.server(mapiport='0', dbname='node3',
+   dbfarm=os.path.join(farm_dir, 'node3'),
+   stdin=process.PIPE, stdout=process.PIPE,
+   stderr=process.PIPE) as prc_3
+):
+# create foo_p2 and members_n2 in node2
+conn2 = pymonetdb.connect(database='node2', port=prc_2.dbport, 
autocommit=True)
+cur2 = conn2.cursor()
+
+cur2.execute("create table foo_p2 (n int, m text)")
+if cur2.execute("insert into foo_p2 values (4, 'I'), (5, 'am'), (6, 
'node2!')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur2.execute("create table members_n2 (n int, m text)")
+if cur2.execute("insert into members_n2 values (1, 'alice'), (2, 
'bob')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur2.close()
+conn2.close()
+
+# create foo_p2 and members_n2 in node2
+conn3 = pymonetdb.connect(database='node3', port=prc_3.dbport, 
autocommit=True)
+cur3 = conn3.cursor()
+
+cur3.execute("create table foo_p3 (n int, m text)")
+if cur3.execute("insert into foo_p3 values (7, 'hi'), (8, 'from'), (9, 
'node3!')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+
+cur3.execute("create table members_n3 (n int, m text)")
+if cur3.execute("insert into members_n3 values (1, 'alice'), (2, 
'bob')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+
+cur3.close()
+conn3.close()
+
+# create foo_merge and member_rpl on master
+conn1 = pymonetdb.connect(database='master', port=prc_1.dbport, 
autocommit=True)
+cur1 = conn1.cursor()
+
+cur1.execute("create table foo_p1 (n int, m text)")
+if cur1.execute("insert into foo_p1 values (1, 'hello'), (2, 'world'), 
(3, '!!')") != 3:
+sys.stderr.write("3 rows inserted expected\n")
+cur1.execute("create remote table foo_p2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table foo_p3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create merge table foo_merge (n int, m text)")
+cur1.execute("alter table foo_merge add table foo_p1")
+cur1.execute("alter table foo_merge add table foo_p2")
+cur1.execute("alter table foo_merge add table foo_p3")
+
+cur1.execute("create table members_n1 (n int, m text)")
+if cur1.execute("insert into members_n1 values (1, 'alice'), (2, 
'bob')") != 2:
+sys.stderr.write("2 rows inserted expected\n")
+cur1.execute("create remote table members_n2 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_2.dbport)+"/node2'")
+cur1.execute("create remote table members_n3 (n int, m text) on 
'mapi:monetdb://localhost:"+str(prc_3.dbport)+"/node3'")
+cur1.execute("create replica table members_rpl (n int, m text)")
+cur1.execute("alter table members_rpl add table members_n1")
+cur1.execute("alter table members_rpl add table members_n2")
+cur1.execute("alter table members_rpl add table members_n3")
+
+ 

MonetDB: default - Enables new tests

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 7cf48ddeb0a3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7cf48ddeb0a3
Modified Files:
sql/test/rel-optimizers/Tests/All
Branch: default
Log Message:

Enables new tests


diffs (12 lines):

diff --git a/sql/test/rel-optimizers/Tests/All 
b/sql/test/rel-optimizers/Tests/All
--- a/sql/test/rel-optimizers/Tests/All
+++ b/sql/test/rel-optimizers/Tests/All
@@ -5,6 +5,8 @@ join-merge-remote-replica-plan
 join-merge-remote-replica
 replicas-base
 replicas-join-plan
+replicas-join
 local-replica
 local-replica-with-actual-remote
+remote-replica-plan
 remote-replica
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Dec2023 - Enables new tests

2023-11-21 Thread stefanos mavros via checkin-list
Changeset: 16dd9eee52b6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/16dd9eee52b6
Modified Files:
sql/test/rel-optimizers/Tests/All
Branch: Dec2023
Log Message:

Enables new tests


diffs (12 lines):

diff --git a/sql/test/rel-optimizers/Tests/All 
b/sql/test/rel-optimizers/Tests/All
--- a/sql/test/rel-optimizers/Tests/All
+++ b/sql/test/rel-optimizers/Tests/All
@@ -5,6 +5,8 @@ join-merge-remote-replica-plan
 join-merge-remote-replica
 replicas-base
 replicas-join-plan
+replicas-join
 local-replica
 local-replica-with-actual-remote
+remote-replica-plan
 remote-replica
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org