Changeset: 493db7435a9a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=493db7435a9a Modified Files: MonetDB.spec sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_scenario.c sql/include/sql_catalog.h sql/server/rel_optimizer.c sql/server/rel_schema.c sql/storage/store.c sql/test/BugTracker-2020/Tests/All sql/test/miscellaneous/Tests/simple_selects.sql sql/test/miscellaneous/Tests/simple_selects.stable.out Branch: default Log Message:
Merged with Oct2020 diffs (truncated from 860 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -868,6 +868,15 @@ else fi %endif +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 +# fix up some paths (/var/run -> /run) +# needed because CMAKE_INSTALL_RUNSTATEDIR refers to /var/run +sed -i 's|/var/run|/run|' \ + %{buildroot}%{_tmpfilesdir}/monetdbd.conf \ + %{buildroot}%{_localstatedir}/monetdb5/dbfarm/.merovingian_properties \ + %{buildroot}%{_unitdir}/monetdbd.service +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -3678,8 +3678,9 @@ main(int argc, char **argv) s = open_rastream(arg); } if (s == NULL) { - fprintf(stderr, "%s: cannot open: %s", arg, mnstr_peek_error(NULL)); + fprintf(stderr, "%s: cannot open: %s\n", arg, mnstr_peek_error(NULL)); c |= 1; + optind++; continue; } // doFile closes 's'. diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c --- a/monetdb5/mal/mal_builder.c +++ b/monetdb5/mal/mal_builder.c @@ -26,7 +26,8 @@ newAssignment(MalBlkPtr mb) InstrPtr q = newInstruction(mb,NULL,NULL); int k; - assert(q); + if (q == NULL) + return NULL; k = newTmpVariable(mb,TYPE_any); if (k < 0) { // construct an exception message to be passed to upper layers using ->errors @@ -46,7 +47,8 @@ newStmt(MalBlkPtr mb, const char *module str mName = putName(module), nName = putName(name); q = newInstruction(mb, mName, nName); - assert(q); + if (q == NULL) + return NULL; setDestVar(q, newTmpVariable(mb, TYPE_any)); if (getDestVar(q) < 0 ){ str msg = createException(MAL, "newStmt", "Can not allocate variable"); @@ -64,7 +66,8 @@ newStmtArgs(MalBlkPtr mb, const char *mo str mName = putName(module), nName = putName(name); q = newInstructionArgs(mb, mName, nName, args); - assert(q); + if (q == NULL) + return NULL; setDestVar(q, newTmpVariable(mb, TYPE_any)); if (getDestVar(q) < 0 || mb->errors != MAL_SUCCEED) { @@ -82,7 +85,8 @@ newReturnStmt(MalBlkPtr mb) InstrPtr q = newInstruction(mb, NULL, NULL); int k; - assert(q); + if (q == NULL) + return NULL; k = newTmpVariable(mb,TYPE_any); if (k < 0 ){ str msg = createException(MAL, "newReturnStmt", "Can not allocate return variable"); @@ -115,7 +119,8 @@ newComment(MalBlkPtr mb, const char *val ValRecord cst; int k; - assert(q); + if (q == NULL) + return NULL; q->token = REMsymbol; q->barrier = 0; cst.vtype= TYPE_str; @@ -143,7 +148,8 @@ newCatchStmt(MalBlkPtr mb, str nme) int i= findVariable(mb,nme); int k; - assert(q); + if (q == NULL) + return NULL; q->barrier = CATCHsymbol; if ( i< 0) { k = newVariable(mb, nme, strlen(nme),TYPE_str); @@ -166,7 +172,8 @@ newRaiseStmt(MalBlkPtr mb, str nme) int i= findVariable(mb,nme); int k; - assert(q); + if (q == NULL) + return NULL; q->barrier = RAISEsymbol; if ( i< 0) { k = newVariable(mb, nme, strlen(nme),TYPE_str); @@ -188,7 +195,8 @@ newExitStmt(MalBlkPtr mb, str nme) int i= findVariable(mb,nme); int k; - assert(q); + if (q == NULL) + return NULL; q->barrier = EXITsymbol; if ( i< 0) { k= newVariable(mb, nme,strlen(nme),TYPE_str); @@ -208,7 +216,8 @@ pushEndInstruction(MalBlkPtr mb) { InstrPtr q = newInstruction(mb,NULL, NULL); - assert(q); + if (q == NULL) + return NULL; q->token = ENDsymbol; q->barrier = 0; q->argc = 0; @@ -273,7 +282,8 @@ pushBte(MalBlkPtr mb, InstrPtr q, bte va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_bte; cst.val.btval= val; cst.len = 0; @@ -305,7 +315,8 @@ pushOid(MalBlkPtr mb, InstrPtr q, oid va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_oid; cst.val.oval= val; cst.len = 0; @@ -321,7 +332,8 @@ pushVoid(MalBlkPtr mb, InstrPtr q) int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_void; cst.val.oval= oid_nil; cst.len = 0; @@ -353,7 +365,8 @@ pushLng(MalBlkPtr mb, InstrPtr q, lng va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_lng; cst.val.lval= val; cst.len = 0; @@ -385,7 +398,8 @@ pushSht(MalBlkPtr mb, InstrPtr q, sht va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_sht; cst.val.shval= val; cst.len = 0; @@ -418,7 +432,8 @@ pushHge(MalBlkPtr mb, InstrPtr q, hge va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_hge; cst.val.hval= val; cst.len = 0; @@ -451,7 +466,8 @@ pushDbl(MalBlkPtr mb, InstrPtr q, dbl va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_dbl; cst.val.dval= val; cst.len = 0; @@ -483,7 +499,8 @@ pushFlt(MalBlkPtr mb, InstrPtr q, flt va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_flt; cst.val.fval= val; cst.len = 0; @@ -518,7 +535,8 @@ pushStr(MalBlkPtr mb, InstrPtr q, const int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_str; if ((cst.val.sval= GDKstrdup(Val)) == NULL) addMalException(mb, createException(MAL, "pushStr", "Can not allocate string variable")); @@ -553,7 +571,8 @@ pushBit(MalBlkPtr mb, InstrPtr q, bit va int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.vtype= TYPE_bit; cst.val.btval= val; cst.len = 0; @@ -569,7 +588,8 @@ pushNil(MalBlkPtr mb, InstrPtr q, int tp int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; cst.len = 0; if( !isaBatType(tpe) && tpe != TYPE_bat ) { assert(tpe < MAXATOMS); /* in particular, tpe!=TYPE_any */ @@ -612,7 +632,8 @@ pushNilType(MalBlkPtr mb, InstrPtr q, ch ValRecord cst; str msg; - assert(q); + if (q == NULL) + return NULL; idx= getAtomIndex(tpe, strlen(tpe), TYPE_any); if( idx < 0 || idx >= GDKatomcnt || idx >= MAXATOMS){ str msg = createException(MAL, "pushNilType", "Can not allocate type variable"); @@ -644,7 +665,8 @@ pushType(MalBlkPtr mb, InstrPtr q, int t ValRecord cst; str msg; - assert(q); + if (q == NULL) + return NULL; cst.vtype=TYPE_void; cst.val.oval= oid_nil; cst.len = 0; @@ -669,7 +691,8 @@ pushZero(MalBlkPtr mb, InstrPtr q, int t ValRecord cst; str msg; - assert(q); + if (q == NULL) + return NULL; cst.vtype=TYPE_int; cst.val.ival= 0; cst.len = 0; @@ -688,7 +711,8 @@ pushZero(MalBlkPtr mb, InstrPtr q, int t InstrPtr pushEmptyBAT(MalBlkPtr mb, InstrPtr q, int tpe) { - assert(q); + if (q == NULL) + return NULL; getModuleId(q) = getName("bat"); getFunctionId(q) = getName("new"); @@ -704,7 +728,8 @@ pushValue(MalBlkPtr mb, InstrPtr q, ValP int _t; ValRecord cst; - assert(q); + if (q == NULL) + return NULL; if (VALcopy(&cst, vr) == NULL) { str msg = createException(MAL, "pushValue", "Can not allocate variable"); addMalException(mb, msg); diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c --- a/monetdb5/mal/mal_exception.c +++ b/monetdb5/mal/mal_exception.c @@ -163,8 +163,8 @@ static str __attribute__((__format__(__p createMalExceptionInternal(MalBlkPtr mb, int pc, enum malexception type, char *prev, const char *format, va_list ap) { bool addnl = false; - const char *s = mb ? getModName(mb) : "unknown"; - const char *fcn = mb ? getFcnName(mb) : "unknown"; + const char *s = mb && getInstrPtr(mb,0) ? getModName(mb) : "unknown"; + const char *fcn = mb && getInstrPtr(mb,0) ? getFcnName(mb) : "unknown"; size_t msglen; if (prev) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list