Changeset: 9d6d92c5ad0d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d6d92c5ad0d
Modified Files:
        monetdb5/optimizer/opt_cquery.c
Branch: trails
Log Message:

Don't simply stop the optimiser by failed malloc, throw proper errors instead


diffs (18 lines):

diff --git a/monetdb5/optimizer/opt_cquery.c b/monetdb5/optimizer/opt_cquery.c
--- a/monetdb5/optimizer/opt_cquery.c
+++ b/monetdb5/optimizer/opt_cquery.c
@@ -147,12 +147,12 @@ OPTcqueryImplementation(Client cntxt, Ma
 
        alias = (int *) GDKzalloc(mb->vtop * 2 * sizeof(int));
        if (alias == 0)
-               return MAL_SUCCEED;
+               throw (MAL,"optimizer.cquery", "failed to allocate space for 
\"alias\"");
 
        // allocate space for output MAL stmts
        if (newMalBlkStmt(mb, slimit + extra_stmts) < 0) {
                GDKfree(alias);
-               return MAL_SUCCEED;
+               throw (MAL,"optimizer.cquery", "allocate newMalBlkStmt failed");
        }
 
        pushInstruction(mb, old[0]);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to