Changeset: 91827c387520 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91827c387520
Removed Files:
monetdb5/optimizer/opt_qep.c
monetdb5/optimizer/opt_qep.h
Modified Files:
MonetDB.spec
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
clients/Tests/malcheck.sh
gdk/gdk_system.c
monetdb5/extras/rapi/rapi.c
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_client.c
monetdb5/mal/mal_import.c
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_recycle.c
monetdb5/mal/mal_resolve.c
monetdb5/mal/mal_resource.c
monetdb5/mal/mal_resource.h
monetdb5/mal/mal_runtime.c
monetdb5/modules/atoms/json.c
monetdb5/modules/atoms/str.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/mal/batExtensions.c
monetdb5/modules/mal/batExtensions.h
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/sysmon.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tokenizer.c
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_pushselect.c
monetdb5/optimizer/opt_wrapper.c
monetdb5/optimizer/optimizer.mal
Branch: default
Log Message:
Merge with Jun2016 branch.
diffs (truncated from 1707 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -9,8 +9,10 @@
%define bits 32
%else
%define bits 64
+%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%define with_int128=1
%endif
+%endif
# only add .oidXX suffix if oid size differs from bit size
%if %{bits} == 64 && %{?oid32:1}%{!?oid32:0}
@@ -592,7 +594,7 @@ Requires: %{name}-client%{?_isa} = %{ver
Obsoletes: MonetDB5-server-rdf
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
Recommends: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
@@ -653,7 +655,7 @@ fi
%exclude %{_libdir}/monetdb5/rapi.mal
%endif
%exclude %{_libdir}/monetdb5/sql*.mal
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
%exclude %{_libdir}/monetdb5/*_hge.mal
%exclude %{_libdir}/monetdb5/autoload/*_hge.mal
%endif
@@ -692,7 +694,7 @@ fi
%docdir %{_datadir}/doc/MonetDB
%{_datadir}/doc/MonetDB/*
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
%package -n MonetDB5-server-hugeint
Summary: MonetDB - 128-bit integer support for MonetDB5-server
Group: Application/Databases
@@ -747,7 +749,7 @@ Requires: %{_bindir}/systemd-tmpfiles
Obsoletes: MonetDB-SQL-devel
Obsoletes: %{name}-SQL
%if (0%{?fedora} >= 22)
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
Recommends: %{name}-SQL-server5-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
@@ -800,7 +802,7 @@ systemd-tmpfiles --create %{_sysconfdir}
%endif
%{_libdir}/monetdb5/createdb/*.sql
%{_libdir}/monetdb5/sql*.mal
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
%exclude %{_libdir}/monetdb5/createdb/*_hge.sql
%exclude %{_libdir}/monetdb5/sql*_hge.mal
%endif
@@ -810,7 +812,7 @@ systemd-tmpfiles --create %{_sysconfdir}
%docdir %{_datadir}/doc/MonetDB-SQL
%{_datadir}/doc/MonetDB-SQL/*
-%if %{bits} == 64
+%if %{?with_int128:1}%{!?with_int128:0}
%package SQL-server5-hugeint
Summary: MonetDB5 128 bit integer (hugeint) support for SQL
Group: Applications/Databases
@@ -966,7 +968,7 @@ developer, but if you do want to test, t
--with-ant=no \
--with-bz2=yes \
--with-curl=yes \
- --with-gdal=yes \
+ --with-gdal=%{?with_lidar:yes}%{!?with_lidar:no} \
--with-geos=%{?with_geos:yes}%{!?with_geos:no} \
--with-java=no \
--with-liblas=%{?with_lidar:yes}%{!?with_lidar:no} \
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -31335,12 +31335,6 @@ comment Handle simple type coercions
pattern optimizer.coercions():str
address OPTwrapper;
-pattern optimizer.dumpQEP(mod:str,fcn:str):str
-address OPTwrapper;
-comment Produce an indented tree visualisation
-
-pattern optimizer.dumpQEP():void
-address OPTwrapper;
pattern optimizer.derivePath(mod:str,fcn:str):str
address OPTwrapper;
comment Join path constructor
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -40756,12 +40756,6 @@ comment Handle simple type coercions
pattern optimizer.coercions():str
address OPTwrapper;
-pattern optimizer.dumpQEP(mod:str,fcn:str):str
-address OPTwrapper;
-comment Produce an indented tree visualisation
-
-pattern optimizer.dumpQEP():void
-address OPTwrapper;
pattern optimizer.derivePath(mod:str,fcn:str):str
address OPTwrapper;
comment Join path constructor
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -913,7 +913,6 @@ str CMDBATimprints(void *ret, bat *bid);
str CMDBATimprintsize(lng *ret, bat *bid);
str CMDBATnew(Client cntxt, MalBlkPtr m, MalStkPtr s, InstrPtr p);
str CMDBATnewColumn(Client cntxt, MalBlkPtr m, MalStkPtr s, InstrPtr p);
-str CMDBATnewDerived(Client cntxt, MalBlkPtr m, MalStkPtr s, InstrPtr p);
str CMDBATnew_persistent(Client cntxt, MalBlkPtr m, MalStkPtr s, InstrPtr p);
str CMDBATpartition(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDBATpartition2(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -1540,7 +1539,6 @@ int OPTconstantsImplementation(Client cn
int OPTcostModelImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTdataflowImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
int OPTdeadcodeImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
-int OPTdumpQEPImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p);
int OPTevaluateImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTfactorizeImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
int OPTgarbageCollectorImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr
stk, InstrPtr pci);
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -546,7 +546,7 @@ MT_create_thread(MT_Id *t, void (*f) (vo
#ifdef HAVE_PTHREAD_SIGMASK
MT_thread_sigmask(&orig_mask, NULL);
#endif
- return ret;
+ return ret ? -1 : 0;
}
void
diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c
--- a/monetdb5/extras/rapi/rapi.c
+++ b/monetdb5/extras/rapi/rapi.c
@@ -394,6 +394,7 @@ str RAPIeval(Client cntxt, MalBlkPtr mb,
}
msg = createException(MAL, "rapi.eval",
"Error running R
expression: %s", errormsg);
+ free(errormsg);
goto wrapup;
}
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
@@ -361,6 +361,7 @@ pushHge(MalBlkPtr mb, InstrPtr q, hge va
cst.vtype= TYPE_hge;
cst.val.hval= val;
+ cst.len = 0;
_t = defConstant(mb,TYPE_hge,&cst);
return pushArgument(mb, q, _t);
}
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -251,7 +251,11 @@ MCinitClientRecord(Client c, oid user, b
c->exception_buf_initialized = 0;
c->error_row = c->error_fld = c->error_msg = c->error_input = NULL;
#ifndef HAVE_EMBEDDED /* no authentication in embedded mode */
- (void) AUTHgetUsername(&c->username, c);
+ {
+ str msg = AUTHgetUsername(&c->username, c);
+ if (msg) /* shouldn't happen */
+ GDKfree(msg);
+ }
#endif
MT_sema_init(&c->s, 0, "Client->s");
return c;
@@ -608,15 +612,13 @@ MCvalid(Client tc)
str
PROFinitClient(Client c){
(void) c;
- startProfiler();
- return MAL_SUCCEED;
+ return startProfiler();
}
str
PROFexitClient(Client c){
(void) c;
- stopProfiler();
- return MAL_SUCCEED;
+ return stopProfiler();
}
diff --git a/monetdb5/mal/mal_import.c b/monetdb5/mal/mal_import.c
--- a/monetdb5/mal/mal_import.c
+++ b/monetdb5/mal/mal_import.c
@@ -292,12 +292,17 @@ evalFile(Client c, str fname, int listin
MSinitClientPrg(c, "user", "main"); /*
re-initialize context */
MCpushClientInput(c, bstream_create(fd, 128 * BLOCK),
c->listing, "");
msg = runScenario(c);
+ if (msg != MAL_SUCCEED) {
+ dumpExceptionsToStream(c->fdout, msg);
+ GDKfree(msg);
+ }
}
filename = p + 1;
}
fd = malOpenSource(filename);
if (fd == 0 || mnstr_errnr(fd) == MNSTR_OPEN_ERROR) {
- if( fd == 0) mnstr_destroy(fd);
+ if (fd)
+ mnstr_destroy(fd);
msg = createException(MAL,"mal.eval", "WARNING: could not open
file: %s\n", filename);
} else {
c->srcFile = filename;
diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -76,7 +76,7 @@ renderTerm(MalBlkPtr mb, MalStkPtr stk,
if( strcmp(cv,"nil") == 0){
strcat(buf+len,cv);
len += strlen(buf+len);
- if( cv) GDKfree(cv);
+ GDKfree(cv);
showtype =getColumnType(getVarType(mb,varid)) >
TYPE_str ||
((isVarUDFtype(mb,varid) ||
isVarTypedef(mb,varid)) && isVarConstant(mb,varid)) ||
isaBatType(getVarType(mb,varid));
} else{
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -198,10 +198,10 @@ renderProfilerEvent(MalBlkPtr mb, MalStk
stmtq = mal_quote(c, strlen(c));
if (stmtq != NULL) {
logadd("\"stmt\":\"%s\",%s", stmtq,prettify);
- //GDKfree(stmtq);
+ GDKfree(stmtq);
}
}
- //GDKfree(stmt);
+ GDKfree(stmt);
// ship the beautified version as well
@@ -1045,9 +1045,10 @@ static void profilerHeartbeat(void *dumm
void setHeartbeat(int delay)
{
- if (hbthread && delay < 0 ){
+ if (delay < 0 ){
ATOMIC_SET(hbrunning, 0, mal_beatLock);
- MT_join_thread(hbthread);
+ if (hbthread)
+ MT_join_thread(hbthread);
return;
}
if ( delay > 0 && delay <= 10)
diff --git a/monetdb5/mal/mal_recycle.c b/monetdb5/mal/mal_recycle.c
--- a/monetdb5/mal/mal_recycle.c
+++ b/monetdb5/mal/mal_recycle.c
@@ -1100,12 +1100,14 @@ RECYCLEdumpInternal(stream *s)
/* and dump the statistics per instruction*/
mnstr_printf(s,"# CL\t lru\t\tcnt\t ticks\t rd\t wr\t Instr\n");
for(i=0; i< recycleBlk->stop; i++){
+ str inst =
instruction2str(recycleBlk,0,getInstrPtr(recycleBlk,i),0);
mnstr_printf(s,"#%d\t%d\t"LLFMT"\t"LLFMT"\t"LLFMT"\t%s\n", i,
recycleBlk->stmt[i]->calls,
recycleBlk->stmt[i]->ticks,
recycleBlk->stmt[i]->rbytes,
recycleBlk->stmt[i]->wbytes,
- instruction2str(recycleBlk,0,getInstrPtr(recycleBlk,i),0));
+ inst);
+ GDKfree(inst);
}
#else
(void) i;
diff --git a/monetdb5/mal/mal_resolve.c b/monetdb5/mal/mal_resolve.c
--- a/monetdb5/mal/mal_resolve.c
+++ b/monetdb5/mal/mal_resolve.c
@@ -698,7 +698,7 @@ typeChecker(stream *out, Module scope, M
int tpe = getArgType(mb, p, k);
if (findGDKtype(tpe) == TYPE_bat ||
findGDKtype(tpe) == TYPE_str ||
- (!isPolyType(tpe) && tpe < TYPE_any &&
ATOMextern(tpe)))
+ (!isPolyType(tpe) && tpe < MAXATOMS &&
ATOMextern(tpe)))
setVarCleanup(mb, getArg(p, k));
}
}
diff --git a/monetdb5/mal/mal_resource.c b/monetdb5/mal/mal_resource.c
--- a/monetdb5/mal/mal_resource.c
+++ b/monetdb5/mal/mal_resource.c
@@ -190,8 +190,10 @@ MALresourceFairness(lng usec)
/* worker reporting time spent in usec! */
clk = usec / 1000;
+#if FAIRNESS_THRESHOLD < 1000 /* it's actually 2000 */
/* cap the maximum penalty */
clk = clk > FAIRNESS_THRESHOLD? FAIRNESS_THRESHOLD:clk;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list