Changeset: 2a9ae757e881 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2a9ae757e881
Modified Files:
sql/storage/bat/bat_utils.c
Branch: Jul2021
Log Message:
Load bat if type wasn't filled in yet by the lower layers.
This fixes a problem where e.g. a 'DELETE FROM t' fails when it is the
first operation on 't' after startup, and t contains a type such as
BLOB that isn't a core GDK type.
diffs (19 lines):
diff --git a/sql/storage/bat/bat_utils.c b/sql/storage/bat/bat_utils.c
--- a/sql/storage/bat/bat_utils.c
+++ b/sql/storage/bat/bat_utils.c
@@ -85,6 +85,15 @@ temp_copy(log_bid b, bool renew, bool te
} else {
if (!(o = quick_descriptor(b)))
return BID_NIL;
+ if (o->ttype < 0) {
+ /* bat was never loaded and it's type is not yet filled
in */
+ if ((o = BATdescriptor(b)) == NULL)
+ return BID_NIL;
+ assert(o->ttype >= 0);
+ BBPunfix(o->batCacheid);
+ o = quick_descriptor(b);
+ assert(o != NULL);
+ }
if (!(c = bat_new(o->ttype, COLSIZE, PERSISTENT)))
return BID_NIL;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list