Changeset: deac451e6cca for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=deac451e6cca Added Files: sql/test/bugs/Tests/WHERE_and_multiple_LEFT_JOIN_incorrect_results-JIRA-43.sql sql/test/bugs/Tests/WHERE_and_multiple_LEFT_JOIN_incorrect_results-JIRA-43.stable.err sql/test/bugs/Tests/WHERE_and_multiple_LEFT_JOIN_incorrect_results-JIRA-43.stable.out Modified Files: MonetDB.spec common/stream/stream.c gdk/gdk.h monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows.single monetdb5/mal/mal_module.c monetdb5/modules/atoms/inet.c monetdb5/modules/atoms/json.c sql/backends/monet5/vaults/netcdf/netcdf.c sql/benchmarks/tpch/Tests/01-explain.stable.out.32bit sql/benchmarks/tpch/Tests/04-explain.stable.out.32bit sql/benchmarks/tpch/Tests/05-explain.stable.out.32bit sql/benchmarks/tpch/Tests/16-explain.stable.out.32bit sql/benchmarks/tpch/Tests/21-explain.stable.out.32bit sql/benchmarks/tpch/Tests/22-explain.stable.out.32bit sql/benchmarks/tpch/fileleak/Tests/leaks.stable.out.Windows sql/server/sql_mvc.c sql/test/bugs/Tests/All Branch: default Log Message:
Merge with Jun2016 branch. diffs (truncated from 733 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -44,17 +44,21 @@ # and build the geom modules. On RedHat Enterprise Linux and # derivatives (CentOS, Scientific Linux), the geos library is not # available. However, the geos library is available in the Extra -# Packages for Enterprise Linux (EPEL). In other words, we can check -# the fedpkgs macro (see above). +# Packages for Enterprise Linux (EPEL). However, On RHEL 6, the geos +# library is too old for us, so we need an extra check for an +# up-to-date version of RHEL. %if %{fedpkgs} +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 %define with_geos 1 %endif +%endif # On Fedora, the liblas library is available, and so we can require it # and build the lidar modules. On RedHat Enterprise Linux and -# derivatives (CentOS, Scientific Linux), the liblas library is not -# available, even with EPEL available. -%if %{?rhel:0}%{!?rhel:1} +# derivatives (CentOS, Scientific Linux), the liblas library is only +# available if EPEL is enabled, and then only on version 7. +%if %{fedpkgs} +%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7 # If the _without_lidar macro is not set, the MonetDB-lidar RPM will # be created. The macro can be set when using mock by passing it the # flag --without=lidar. @@ -62,6 +66,7 @@ %define with_lidar 1 %endif %endif +%endif %if %{?rhel:0}%{!?rhel:1} # If the _without_samtools macro is not set, the MonetDB-bam-MonetDB5 @@ -117,13 +122,15 @@ BuildRequires: bzip2-devel BuildRequires: cfitsio-devel %endif %if %{?with_geos:1}%{!?with_geos:0} -BuildRequires: geos-devel >= 3.0.0 +BuildRequires: geos-devel >= 3.4.0 %endif BuildRequires: gsl-devel %if %{?with_lidar:1}%{!?with_lidar:0} -BuildRequires: liblas-devel gdal-devel libgeotiff-devel +BuildRequires: liblas-devel >= 1.8.0 +BuildRequires: gdal-devel +BuildRequires: libgeotiff-devel # Fedora 22 liblas-devel does not depend on liblas: -BuildRequires: liblas +BuildRequires: liblas >= 1.8.0 %endif BuildRequires: libatomic_ops-devel BuildRequires: libcurl-devel diff --git a/common/stream/stream.c b/common/stream/stream.c --- a/common/stream/stream.c +++ b/common/stream/stream.c @@ -2113,7 +2113,11 @@ socket_write(stream *s, const void *buf, #ifdef _MSC_VER WSAGetLastError() == WSAEWOULDBLOCK && #else - (errno == EAGAIN || errno == EWOULDBLOCK) && /* it was! */ + (errno == EAGAIN +#if EAGAIN != EWOULDBLOCK + || errno == EWOULDBLOCK +#endif + ) && /* it was! */ #endif s->timeout_func != NULL && /* callback function exists */ !(*s->timeout_func)()) /* callback says don't stop */ @@ -2139,7 +2143,11 @@ socket_write(stream *s, const void *buf, #ifdef _MSC_VER WSAGetLastError() == WSAEWOULDBLOCK #else - (errno == EAGAIN || errno == EWOULDBLOCK) + (errno == EAGAIN +#if EAGAIN != EWOULDBLOCK + || errno == EWOULDBLOCK +#endif + ) #endif ) s->errnr = MNSTR_TIMEOUT; diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1148,6 +1148,7 @@ gdk_export bte ATOMelmshift(int sz); * @end itemize */ /* NOTE: `p' is evaluated after a possible upgrade of the heap */ +#if SIZEOF_VAR_T == 8 #define HTputvalue(b, p, v, copyall, HT) \ do { \ if ((b)->HT->varsized && (b)->HT->type) { \ @@ -1179,7 +1180,6 @@ gdk_export bte ATOMelmshift(int sz); ATOMputFIX((b)->HT->type, (p), v); \ } \ } while (0) -#define Tputvalue(b, p, v, copyall) HTputvalue(b, p, v, copyall, T) #define HTreplacevalue(b, p, v, HT) \ do { \ if ((b)->HT->varsized && (b)->HT->type) { \ @@ -1226,6 +1226,77 @@ gdk_export bte ATOMelmshift(int sz); ATOMreplaceFIX((b)->HT->type, (p), v); \ } \ } while (0) +#else +#define HTputvalue(b, p, v, copyall, HT) \ + do { \ + if ((b)->HT->varsized && (b)->HT->type) { \ + var_t _d; \ + ptr _ptr; \ + ATOMputVAR((b)->HT->type, (b)->HT->vheap, &_d, v); \ + if ((b)->HT->width < SIZEOF_VAR_T && \ + ((b)->HT->width <= 2 ? _d - GDK_VAROFFSET : _d) >= ((size_t) 1 << (8 * (b)->HT->width))) { \ + /* doesn't fit in current heap, upgrade it */ \ + if (GDKupgradevarheap((b)->HT, _d, (copyall), (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ + goto bunins_failed; \ + } \ + _ptr = (p); \ + switch ((b)->HT->width) { \ + case 1: \ + * (unsigned char *) _ptr = (unsigned char) (_d - GDK_VAROFFSET); \ + break; \ + case 2: \ + * (unsigned short *) _ptr = (unsigned short) (_d - GDK_VAROFFSET); \ + break; \ + case 4: \ + * (var_t *) _ptr = _d; \ + break; \ + } \ + } else { \ + ATOMputFIX((b)->HT->type, (p), v); \ + } \ + } while (0) +#define HTreplacevalue(b, p, v, HT) \ + do { \ + if ((b)->HT->varsized && (b)->HT->type) { \ + var_t _d; \ + ptr _ptr; \ + _ptr = (p); \ + switch ((b)->HT->width) { \ + case 1: \ + _d = (var_t) * (unsigned char *) _ptr + GDK_VAROFFSET; \ + break; \ + case 2: \ + _d = (var_t) * (unsigned short *) _ptr + GDK_VAROFFSET; \ + break; \ + case 4: \ + _d = * (var_t *) _ptr; \ + break; \ + } \ + ATOMreplaceVAR((b)->HT->type, (b)->HT->vheap, &_d, v); \ + if ((b)->HT->width < SIZEOF_VAR_T && \ + ((b)->HT->width <= 2 ? _d - GDK_VAROFFSET : _d) >= ((size_t) 1 << (8 * (b)->HT->width))) { \ + /* doesn't fit in current heap, upgrade it */ \ + if (GDKupgradevarheap((b)->HT, _d, 0, (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ + goto bunins_failed; \ + } \ + _ptr = (p); \ + switch ((b)->HT->width) { \ + case 1: \ + * (unsigned char *) _ptr = (unsigned char) (_d - GDK_VAROFFSET); \ + break; \ + case 2: \ + * (unsigned short *) _ptr = (unsigned short) (_d - GDK_VAROFFSET); \ + break; \ + case 4: \ + * (var_t *) _ptr = _d; \ + break; \ + } \ + } else { \ + ATOMreplaceFIX((b)->HT->type, (p), v); \ + } \ + } while (0) +#endif +#define Tputvalue(b, p, v, copyall) HTputvalue(b, p, v, copyall, T) #define Treplacevalue(b, p, v) HTreplacevalue(b, p, v, T) #define HTfastins_nocheck(b, p, v, s, HT) \ do { \ diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows old mode 100755 new mode 100644 diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows.single b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows.single old mode 100755 new mode 100644 diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c --- a/monetdb5/mal/mal_module.c +++ b/monetdb5/mal/mal_module.c @@ -388,9 +388,9 @@ char **getHelp(Module m, str inputpat, i if( t) { sig++; *t=0; completion=0; } /* rudimentary patterns only. - *.nme nme.* nme.nme *.* - ignore the rest. - */ + * *.nme nme.* nme.nme *.* + * ignore the rest. + */ modnme= pat; if( (fcnnme = strchr(pat,'.')) ){ *fcnnme++ = 0; @@ -414,20 +414,20 @@ char **getHelp(Module m, str inputpat, i /* display module information if there is no function */ if( fcnnme == NULL){ for(i=0; i< MAXSCOPE; i++) - for(j=0; j< MAXSCOPE; j++){ - m= scopeJump[i][j]; - while(m != NULL){ - if( strncmp(modnme,m->name,len1) ==0 || *modnme=='*'){ - msg[top++] = GDKstrdup(m->name); - msg[top] =0; - if( top == maxhelp-1) { - msg= (char **) GDKrealloc(msg,sizeof(str)* maxhelp); - maxhelp+= MAXHELP; + for(j=0; j< MAXSCOPE; j++){ + m= scopeJump[i][j]; + while(m != NULL){ + if( strncmp(modnme,m->name,len1) ==0 || *modnme=='*'){ + msg[top++] = GDKstrdup(m->name); + msg[top] =0; + if( top == maxhelp-1) { + msg= (char **) GDKrealloc(msg,sizeof(str)* maxhelp); + maxhelp+= MAXHELP; + } } + m= m->sibling; } - m= m->sibling; } - } GDKfree(pat); return msg; } @@ -441,78 +441,78 @@ char **getHelp(Module m, str inputpat, i #ifdef MAL_SCOPE_DEBUG printf("showHelp: %s %s [" SZFMT "] %s %s\n", - modnme,fcnnme,len2, (doc?"doc":""), (sig?"sig":"")); + modnme,fcnnme,len2, (doc?"doc":""), (sig?"sig":"")); #endif for(i=0; i< MAXSCOPE; i++) - for(k=0; k< MAXSCOPE; k++){ - m= scopeJump[i][k]; - while( m){ - if( strncmp(modnme,m->name,len1) && *modnme!='*' ) { - m= m->sibling; - continue; + for(k=0; k< MAXSCOPE; k++){ + m= scopeJump[i][k]; + while( m){ + if( strncmp(modnme,m->name,len1) && *modnme!='*' ) { + m= m->sibling; + continue; + } + for(j=0;j<MAXSCOPE;j++) + for(s= m->subscope[j]; s; s= s->peer) + if( strncmp(fcnnme,s->name,len2)==0 || *fcnnme=='*') { + fnd=0; + if( completion ) { + snprintf(buf,sizeof(buf)," %s.%s", + ((*modnme=='*' || *modnme==0)? m->name:modnme),s->name); + if( tstDuplicate(msg,buf+1) ) { + continue; + } + } else + if( doc) { + char *v; + + fcnDefinition(s->def,s->def->stmt[0],buf,FALSE,buf,sizeof(buf)); + buf[0]=' '; + + v= strstr(buf,"address"); + if( v) *v=0; + if( tstDuplicate(msg,buf+1) && s->def->help==0 ) fnd++; + if(fnd) continue; + + msg[top++]= GDKstrdup(buf+1); + if(v){ + *v='a'; + msg[top++]= GDKstrdup(v); + } + msg[top] = 0; + + if( s->def->help) { + char *w; + strcpy(buf+1,"comment "); + v= buf+1+8; + for( w= s->def->help; *w && v <buf+sizeof(buf)-2; w++) + if( *w == '\n'){ + /*ignore */ + } else *v++ = *w; + *v = 0; + } else fnd = 1; /* ignore non-existing comment */ + if(v){ + *v++ ='\n'; + *v=0; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list