Changeset: 236582aa85c3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/236582aa85c3 Modified Files: sql/storage/bat/bat_storage.c Branch: iso Log Message:
merged with jul2021 diffs (94 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2445,10 +2445,11 @@ BATassertProps(BAT *b) /* candidate list with exceptions */ assert(b->batRole == TRANSIENT); assert(b->tvheap->free <= b->tvheap->size); + assert(b->tvheap->free >= sizeof(ccand_t)); assert((negoid_cand(b) && ccand_free(b) % SIZEOF_OID == 0) || mask_cand(b)); if (negoid_cand(b) && ccand_free(b) > 0) { - const oid *oids = (const oid *) b->tvheap->base; - q = b->tvheap->free / SIZEOF_OID; + const oid *oids = (const oid *) ccand_first(b); + q = ccand_free(b) / SIZEOF_OID; assert(oids != NULL); assert(b->tseqbase + BATcount(b) + q <= GDK_oid_max); /* exceptions within range */ diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -926,7 +926,7 @@ cs_update_bat( sql_trans *tr, column_sto } /* When we go to smaller grained update structures we should check for concurrent updates on this column ! */ /* currently only one update delta is possible */ - if (!otids->tsorted) { + if (!otids->tsorted || complex_cand(otids) /* make sure we have simple dense or oids */) { BAT *sorted, *order; if (BATsort(&sorted, &order, NULL, otids, NULL, NULL, false, false, false) != GDK_SUCCEED) { if (otids != tids) diff --git a/sql/test/SQLancer/Tests/sqlancer15.test b/sql/test/SQLancer/Tests/sqlancer15.test --- a/sql/test/SQLancer/Tests/sqlancer15.test +++ b/sql/test/SQLancer/Tests/sqlancer15.test @@ -802,9 +802,60 @@ INSERT INTO t1(c0, c1) VALUES(-1, INTERV statement ok rowcount 3 INSERT INTO t1(c4, c1, c0) VALUES(0.34700167, INTERVAL '5' MONTH, 0), (9, INTERVAL '-4' MONTH, NULL), (-2, INTERVAL '-2' MONTH, NULL) -statement ok rowcount 16 +statement ok rowcount 17 UPDATE t1 SET c0 = 0, c1 = INTERVAL '-8' MONTH, c4 = least(t1.c4, 0) statement ok DROP TABLE t1 +statement ok +START TRANSACTION + +statement ok +CREATE TABLE t1(c0 tinyint, c1 BLOB) + +statement ok +CREATE TABLE t2(c0 tinyint, c1 BLOB, c3 DOUBLE) + +statement ok rowcount 1 +INSERT INTO t2(c1, c3, c0) VALUES(BLOB 'bC4AF0', 0.7, 4) + +statement ok rowcount 1 +DELETE FROM t2 WHERE TRUE + +statement ok rowcount 2 +INSERT INTO t2(c0, c1, c3) VALUES(-0.2, BLOB '', 0.5), (3, BLOB '', 0.7) + +statement ok rowcount 6 +INSERT INTO t2(c0) VALUES(0), (6), (7), (6), (2), (5) + +statement ok rowcount 1 +INSERT INTO t2(c3) VALUES(0.3) + +statement ok rowcount 2 +INSERT INTO t2(c1, c3) VALUES(BLOB 'c51b70', 1), (BLOB 'a7BE7D64', 0.6) + +statement ok rowcount 1 +INSERT INTO t2(c1, c0) VALUES(BLOB '20', 5) + +statement ok rowcount 1 +INSERT INTO t2(c3, c0, c1) VALUES(-6.1, 9, BLOB 'A4') + +statement ok rowcount 2 +INSERT INTO t2(c3) VALUES(0.3), (0.7) + +statement ok rowcount 1 +INSERT INTO t2(c0, c3, c1) VALUES(0, 0.4, BLOB '') + +statement ok rowcount 1 +INSERT INTO t1(c0) VALUES(2) + +statement ok rowcount 1 +INSERT INTO t2(c1, c0) VALUES(BLOB 'FCb405', NULL) + +statement ok rowcount 17 +UPDATE t2 SET c1 = BLOB 'AA' FROM t1 WHERE 0.11 NOT BETWEEN t1.c0 AND 0.47 + +statement ok +ROLLBACK + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list