Changeset: b808f98f6cf3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b808f98f6cf3
Modified Files:
        .hgtags
        MonetDB.spec
        NT/monetdb_config.h.in
        NT/rules.msc
        clients/mapilib/mapi.rc
        clients/odbc/driver/driver.rc
        clients/odbc/winsetup/setup.rc
        common/stream/stream.c
        configure.ag
        debian/changelog
        gdk/libbat.rc
        libversions
        monetdb5/mal/mal_client.c
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_import.c
        monetdb5/mal/mal_linker.c
        monetdb5/mal/mal_session.c
        monetdb5/optimizer/opt_pipes.c
        monetdb5/optimizer/opt_remap.c
        monetdb5/tools/libmonetdb5.rc
        sql/backends/monet5/sql.c
        vertoo.data
Branch: trails
Log Message:

Merge with default


diffs (truncated from 360 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -680,3 +680,5 @@ 1534ee14ff84fe5629becc6a5b5e2990b694d5a3
 269ab71a82190d6024b3a920837089d657893493 Jul2017_5
 1534ee14ff84fe5629becc6a5b5e2990b694d5a3 Jul2017_SP1_release
 269ab71a82190d6024b3a920837089d657893493 Jul2017_SP1_release
+fce449d5af88de715fde36624815a56ef34c56bb Jul2017_7
+fce449d5af88de715fde36624815a56ef34c56bb Jul2017_SP2_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -132,7 +132,7 @@ Vendor: MonetDB BV <i...@monetdb.org>
 Group: Applications/Databases
 License: MPLv2.0
 URL: https://www.monetdb.org/
-Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP1/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jul2017-SP2/%{name}-%{version}.tar.bz2
 
 # we need systemd for the _unitdir macro to exist
 # we need checkpolicy and selinux-policy-devel for the SELinux policy
@@ -1041,6 +1041,47 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Oct 11 2017 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> - 
11.27.7-20171011
+- Rebuilt.
+- BZ#4017: server crashes when executing particular loopback query in
+  embedded python
+- BZ#6239: Incorrect profiling
+- BZ#6261: New handling of delta tables hurts badly reusage of bats
+- BZ#6287: should the CORR function return some numeric type that allows
+  fractions?
+- BZ#6321: Two-column aggregation on join result extremely slow.
+- BZ#6343: MERGE TABLE issue: unable to find
+- BZ#6348: Interference of procedure/table name
+- BZ#6350: Carriage return and form feed in TEXT fields are returned as
+  'r' and 'f' in jdbcclient and ResultSets
+- BZ#6352: Scope resolution problem (sqlsmith)
+- BZ#6353: implicit NULL value not propagated in distributed/remote query
+- BZ#6374: Wrong answer from merge table after content changes
+- BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+- BZ#6380: unable to create new databases from clean installation
+- BZ#6381: Parser misses error messages in conditional
+- BZ#6382: Can't set JSON fields via PreparedStatement
+- BZ#6384: crash when setting a wrong listenaddr
+- BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+  processed
+- BZ#6386: Unexpected error from server for query with long floats
+- BZ#6387: Performance degradation on multi column sort
+- BZ#6388: JDBC Connection via user voc produces errors when fetching
+  certain meta data information
+- BZ#6392: SELECT EXISTS (empty table) returns 'true'
+- BZ#6395: BAT leak of scalar result sets
+- BZ#6397: Isolation of generating functions not correct
+- BZ#6398: Null Matches in outer join are not supported
+- BZ#6399: UDF crashes when subquery and scalar values are passed
+  as pameters
+- BZ#6400: getCharacterStream() currently not supported
+- BZ#6404: COPY INTO crashes if table has primary key or foreign key
+  constraint
+- BZ#6409: sqllogictest crash on aggregation query with NOT IN clause
+  in HAVING clause
+- BZ#6410: Sqlitelogictest crash on aggregation query with IN clause
+- BZ#6411: Sqlitelogictest crash in aggregation query
+
 * Thu Jul 27 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.5-20170727
 - Rebuilt.
 - BZ#6375: MAL profiler truncates JSON objects larger than 8192 characters
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -962,6 +962,8 @@ open_stream(const char *filename, const 
 
 #ifdef HAVE_LIBZ
 #if ZLIB_VERNUM < 0x1290
+typedef size_t z_size_t;
+
 /* simplistic version for ancient systems (CentOS 6, Ubuntu Trusty) */
 static z_size_t
 gzfread(void *buf, z_size_t size, z_size_t nitems, gzFile file)
@@ -969,7 +971,7 @@ gzfread(void *buf, z_size_t size, z_size
        unsigned sz = nitems * size > (size_t) 1 << 30 ? 1 << 30 : (unsigned) 
(nitems * size);
        int len;
 
-       len = gzread(fp, buf, sz);
+       len = gzread(file, buf, sz);
        if (len == -1)
                return 0;
        return (z_size_t) len / size;
@@ -988,7 +990,7 @@ gzfwrite(const void *buf, z_size_t size,
                if (wlen <= 0)
                        return 0;
                buf = (const void *) ((const char *) buf + wlen);
-               sz -= (z_wize_t) wlen;
+               sz -= (z_size_t) wlen;
        }
        return nitems;
 }
@@ -2286,7 +2288,11 @@ socket_read(stream *s, void *buf, size_t
                        }
                        if (n == 0)     /* unexpected end of file */
                                break;
-                       nr += n;
+                       nr +=
+#ifdef _MSC_VER
+                               (int)
+#endif
+                               n;
                }
        }
        return nr / (ssize_t) elmsize;
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+monetdb (11.27.7) unstable; urgency=low
+
+  * Rebuilt.
+  * BZ#4017: server crashes when executing particular loopback query in
+    embedded python
+  * BZ#6239: Incorrect profiling
+  * BZ#6261: New handling of delta tables hurts badly reusage of bats
+  * BZ#6287: should the CORR function return some numeric type that allows
+    fractions?
+  * BZ#6321: Two-column aggregation on join result extremely slow.
+  * BZ#6343: MERGE TABLE issue: unable to find
+  * BZ#6348: Interference of procedure/table name
+  * BZ#6350: Carriage return and form feed in TEXT fields are returned as
+    'r' and 'f' in jdbcclient and ResultSets
+  * BZ#6352: Scope resolution problem (sqlsmith)
+  * BZ#6353: implicit NULL value not propagated in distributed/remote query
+  * BZ#6374: Wrong answer from merge table after content changes
+  * BZ#6379: Table UDF: SEGV raised when invoking a non existing function
+  * BZ#6380: unable to create new databases from clean installation
+  * BZ#6381: Parser misses error messages in conditional
+  * BZ#6382: Can't set JSON fields via PreparedStatement
+  * BZ#6384: crash when setting a wrong listenaddr
+  * BZ#6385: AGGREGATE UDFs with more than 2 parameters incorrectly
+    processed
+  * BZ#6386: Unexpected error from server for query with long floats
+  * BZ#6387: Performance degradation on multi column sort
+  * BZ#6388: JDBC Connection via user voc produces errors when fetching
+    certain meta data information
+  * BZ#6392: SELECT EXISTS (empty table) returns 'true'
+  * BZ#6395: BAT leak of scalar result sets
+  * BZ#6397: Isolation of generating functions not correct
+  * BZ#6398: Null Matches in outer join are not supported
+  * BZ#6399: UDF crashes when subquery and scalar values are passed
+    as pameters
+  * BZ#6400: getCharacterStream() currently not supported
+  * BZ#6404: COPY INTO crashes if table has primary key or foreign key
+    constraint
+  * BZ#6409: sqllogictest crash on aggregation query with NOT IN clause
+    in HAVING clause
+  * BZ#6410: Sqlitelogictest crash on aggregation query with IN clause
+  * BZ#6411: Sqlitelogictest crash in aggregation query
+
+ -- Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com>  Wed, 11 Oct 2017 
11:01:48 +0200
+
 monetdb (11.27.5) unstable; urgency=low
 
   * Rebuilt.
diff --git a/libversions b/libversions
--- a/libversions
+++ b/libversions
@@ -36,13 +36,13 @@
 
 # version of the GDK library (subdirectory gdk; also includes
 # common/options and common/utils)
-GDK_VERSION=15:2:0
+GDK_VERSION=15:3:0
 
 # version of the MAPI library (subdirectory clients/mapilib)
-MAPI_VERSION=9:1:0
+MAPI_VERSION=9:2:0
 
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras)
-MONETDB5_VERSION=23:2:0
+MONETDB5_VERSION=23:3:0
 
 # version of the STREAM library (subdirectory common/stream)
-STREAM_VERSION=10:1:2
+STREAM_VERSION=10:2:2
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
@@ -208,6 +208,10 @@ MCinitClientRecord(Client c, oid user, b
        c->blkmode = 0;
 
        c->fdin = fin ? fin : bstream_create(GDKin, 0);
+       if ( c->fdin == NULL){
+               showException(GDKout, MAL, "initClientRecord", MAL_MALLOC_FAIL);
+               return NULL;
+       }
        c->yycur = 0;
        c->bak = NULL;
 
@@ -218,8 +222,8 @@ MCinitClientRecord(Client c, oid user, b
        c->curprg = c->backup = 0;
        c->glb = 0;
 
-       /* remove garbage from previous connection 
-        * be aware, a user can introduce several modules 
+       /* remove garbage from previous connection
+        * be aware, a user can introduce several modules
         * that should be freed to avoid memory leaks */
        c->usermodule = c->curmodule = 0;
 
@@ -235,6 +239,10 @@ MCinitClientRecord(Client c, oid user, b
 
        prompt = !fin ? GDKgetenv("monet_prompt") : PROMPT1;
        c->prompt = GDKstrdup(prompt);
+       if ( c->prompt == NULL){
+               showException(GDKout, MAL, "initClientRecord", MAL_MALLOC_FAIL);
+               return NULL;
+       }
        c->promptlength = strlen(prompt);
 
        c->actions = 0;
@@ -268,7 +276,7 @@ MCinitClient(oid user, bstream *fin, str
 
 /*
  * The administrator should be initialized to enable interpretation of
- * the command line arguments, before it starts serviceing statements
+ * the command line arguments, before it starts servicing statements
  */
 int
 MCinitClientThread(Client c)
diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -384,9 +384,11 @@ cloneFunction(Module scope, Symbol proc,
                return NULL;
        }
        freeMalBlk(new->def);
-       new->def = copyMalBlk(proc->def);
-       if( new->def == NULL)
+       if((new->def = copyMalBlk(proc->def)) == NULL) {
+               freeSymbol(new);
+               fprintf(stderr,"cloneFunction() failed");
                return NULL;
+       }
        /* now change the definition of the original proc */
 #ifdef DEBUG_CLONE
        fprintf(stderr, "CLONED VERSION\n");
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
@@ -95,6 +95,10 @@ malLoadScript(Client c, str name, bstrea
                throw(MAL, "malInclude", "file %s too large to process", name);
        }
        *fdin = bstream_create(fd, sz == 0 ? (size_t) (2 * 128 * BLOCK) : sz);
+       if(*fdin == NULL) {
+               mnstr_destroy(fd);
+               throw(MAL, "malInclude", MAL_MALLOC_FAIL);
+       }
        if (bstream_next(*fdin) < 0)
                mnstr_printf(c->fdout, "!WARNING: could not read %s\n", name);
        return MAL_SUCCEED;
diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c
--- a/monetdb5/mal/mal_linker.c
+++ b/monetdb5/mal/mal_linker.c
@@ -109,7 +109,14 @@ getAddress(str fcnname)
 
        adr = (MALfcn) dlsym(dl, fcnname);
        filesLoaded[lastfile].modname = GDKstrdup("libmonetdb5");
+       if(filesLoaded[lastfile].modname == NULL) {
+               return NULL;
+       }
        filesLoaded[lastfile].fullname = GDKstrdup("libmonetdb5");
+       if(filesLoaded[lastfile].fullname == NULL) {
+               GDKfree(filesLoaded[lastfile].modname);
+               return NULL;
+       }
        filesLoaded[lastfile].handle = dl;
        lastfile ++;
        return adr;
@@ -229,7 +236,16 @@ loadLibrary(str filename, int flag)
                throw(MAL,"mal.linker", "loadModule internal error, too many 
modules loaded");
        } else {
                filesLoaded[lastfile].modname = GDKstrdup(filename);
+               if(filesLoaded[lastfile].modname == NULL) {
+                       MT_lock_unset(&mal_contextLock);
+                       throw(LOADER, "loadLibrary", RUNTIME_LOAD_ERROR " could 
not allocate space");
+               }
                filesLoaded[lastfile].fullname = GDKstrdup(handle ? nme : "");
+               if(filesLoaded[lastfile].fullname == NULL) {
+                       GDKfree(filesLoaded[lastfile].modname);
+                       MT_lock_unset(&mal_contextLock);
+                       throw(LOADER, "loadLibrary", RUNTIME_LOAD_ERROR " could 
not allocate space");
+               }
                filesLoaded[lastfile].handle = handle ? handle : 
filesLoaded[0].handle;
                lastfile ++;
        }
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -327,6 +327,12 @@ MSscheduleClient(str command, str challe
                /* move this back !! */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to