Changeset: 841cb62149ad for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=841cb62149ad 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: 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: Jun2016 Log Message:
Merge with Jul2015 branch.
diffs (truncated from 676 to 300 lines):
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
@@ -1135,6 +1135,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) { \
@@ -1166,7 +1167,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) { \
@@ -1213,6 +1213,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;
+ }
+ } else if(
strncmp(fcnnme,s->name,strlen(fcnnme))==0 ||
+
*fcnnme=='*' ) {
+
fcnDefinition(s->def,s->def->stmt[0],buf,FALSE,buf,sizeof(buf));
+
buf[0]=' ';
+ t=
strstr(buf,"address");
+ if( t)
*t= 0;
+ }
+ if( fnd == 0 && buf[1]){
+ msg[top++] =
GDKstrdup(buf+1);
+ msg[top] = 0;
+ }
+ if( top >= maxhelp-3){
+ msg= (char **)
GDKrealloc(msg,sizeof(str)* (maxhelp+MAXHELP));
+ maxhelp+=
MAXHELP;
+ }
+ }
+ m = m->sibling;
+ }
}
- 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;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list
