Changeset: 4a7e5558870d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a7e5558870d
Modified Files:
        gdk/gdk_cross.c
Branch: default
Log Message:

HACK: refuse to produce huge cross products during a test run.
Currently, sql/test/SQLite_regress/sqillogictest/select4.test does
this.  Somewhere along the way it produces a 2e9 row cross product (32
GB results in two columns) which are both projected (another 32 GB).


diffs (14 lines):

diff --git a/gdk/gdk_cross.c b/gdk/gdk_cross.c
--- a/gdk/gdk_cross.c
+++ b/gdk/gdk_cross.c
@@ -17,6 +17,10 @@ BATcross1(BAT **r1p, BAT **r2p, BAT *l, 
        BUN i, j;
        oid *restrict p1, *restrict p2;
 
+       FORCEMITODEBUG if (BATcount(l) * BATcount(r) > 100000000) {
+               GDKerror("BATsubcross: crossproduct too large for testing 
("BUNFMT"*"BUNFMT")\n", BATcount(l), BATcount(r));
+               return GDK_FAIL;
+       }
        bn1 = COLnew(0, TYPE_oid, BATcount(l) * BATcount(r), TRANSIENT);
        bn2 = COLnew(0, TYPE_oid, BATcount(l) * BATcount(r), TRANSIENT);
        if (bn1 == NULL || bn2 == NULL) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to