Changeset: b893fb39cb99 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b893fb39cb99
Added Files:
        sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out.single
Modified Files:
        MonetDB.spec
        debian/control
        debian/libmonetdb-client-odbc.postinst
        debian/monetdb5-sql.install
        gdk/gdk_group.c
        gdk/gdk_join.c
        gdk/gdk_logger.c
        gdk/gdk_private.h
        gdk/gdk_select.c
        gdk/gdk_system_private.h
        gdk/gdk_unique.c
        sql/backends/monet5/generator/Tests/generator03.stable.out
        sql/backends/monet5/sql_result.c
        sql/backends/monet5/sql_statement.c
        
sql/test/BugDay_2005-10-06_2.9.3/Tests/cast_to_interval.SF-1019079.stable.out
        
sql/test/BugDay_2005-10-06_2.9.3/Tests/error_in_sql_parser.SF-1019122.stable.out
        sql/test/BugDay_2005-10-06_2.9.3/Tests/set_types.SF-932360.stable.out
        
sql/test/BugDay_2005-11-09_2.9.3/Tests/date_functions.SF-967145.stable.out
        
sql/test/BugDay_2005-11-09_2.9.3/Tests/interval_on_time_stamp.SF-1080488.stable.out
        
sql/test/BugDay_2005-12-19_2.9.3/Tests/cast_interval.SF.1280682.stable.out
        
sql/test/BugDay_2005-12-19_2.9.3/Tests/interval_times_int.SF-1281996.stable.out
        sql/test/BugTracker-2011/Tests/default-interval.Bug-2877.stable.out
        sql/test/BugTracker-2011/Tests/time_precision.Bug-2873.stable.out
        
sql/test/BugTracker-2012/Tests/incorrect_cast_from_double_to_int.Bug-2579.stable.out
        
sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.stable.out
        sql/test/BugTracker-2012/Tests/timestamp-diff.Bug-3190.stable.out
        sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out
        sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
        sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
        sql/test/BugTracker-2015/Tests/div_zero.Bug-3742.stable.out
        sql/test/BugTracker-2015/Tests/sum_interval.Bug-3785.stable.out
        sql/test/BugTracker/Tests/cast_interval2time.SF-1488247.stable.out
        sql/test/Tests/timezone.stable.out
        sql/test/VOC/Tests/median.Bug-3096.stable.out
        sql/test/bugs/Tests/default_with_cast.SF-1334486.stable.out
        sql/test/bugs/Tests/interval_convert_bugs-sf-1274077-1274085.stable.out
        sql/test/bugs/Tests/interval_parse_bug-sf-1263967.stable.out
        sql/test/pg_regress/Tests/alter_table.stable.out
        sql/test/pg_regress/Tests/date.stable.out
        sql/test/pg_regress/Tests/horology.stable.out
        sql/test/pg_regress/Tests/interval.stable.out
        sql/test/pg_regress/Tests/interval.stable.out.int128
        sql/test/pg_regress/Tests/reltime.stable.out
        sql/test/pg_regress/Tests/time.stable.out
        sql/test/pg_regress/Tests/timestamp.stable.out
        sql/test/pg_regress/Tests/timestamptz.stable.out
        sql/test/pg_regress/Tests/timetz.stable.out
        sql/test/snodgrass/Tests/cast_select.stable.out
        sql/test/snodgrass/Tests/interval_parsing.stable.out
Branch: default
Log Message:

merged with jul2015


diffs (truncated from 1580 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -659,6 +659,7 @@ fi
 %exclude %{_libdir}/monetdb5/sql*.mal
 %if %{bits} == 64
 %exclude %{_libdir}/monetdb5/*_hge.mal
+%exclude %{_libdir}/monetdb5/autoload/*_hge.mal
 %endif
 %{_libdir}/monetdb5/*.mal
 %if %{?with_geos:1}%{!?with_geos:0}
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -144,7 +144,7 @@ Description: MonetDB php5 client module
 
 Package: perl-monetdb-client
 Architecture: any
-Depends: ${shlibs:Depends}, ${perl:Depends}
+Depends: ${shlibs:Depends}, ${perl:Depends}, libdbi-perl
 Provides: ${perl:Provides}
 Description: MonetDB perl client code
  MonetDB is a database management system that is developed from a
@@ -157,7 +157,7 @@ Description: MonetDB perl client code
 
 Package: ruby-monetdb-client
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, libruby1.8
+Depends: ${shlibs:Depends}, ${misc:Depends}, libruby
 Description: MonetDB Ruby client module
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
@@ -197,7 +197,7 @@ Package: libmonetdb5-server-gsl
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, monetdb5-sql
-Description: MonetDB5 SQL GIS support module
+Description: MonetDB5 SQL interface to the gsl library
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
  automatic index management, extensibility of data types and search
@@ -210,7 +210,7 @@ Package: libmonetdb5-server-bam
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, monetdb5-sql
-Description: MonetDB5 SQL GIS support module
+Description: MonetDB5 SQL interface to the bam library
  MonetDB is a database management system that is developed from a
  main-memory perspective with use of a fully decomposed storage model,
  automatic index management, extensibility of data types and search
diff --git a/debian/libmonetdb-client-odbc.postinst 
b/debian/libmonetdb-client-odbc.postinst
--- a/debian/libmonetdb-client-odbc.postinst
+++ b/debian/libmonetdb-client-odbc.postinst
@@ -10,7 +10,7 @@ set -e
 
 if [ "$1" = configure ]; then
     # install driver if first install of package or if driver not installed yet
-    if [ ! "$2" ] || ! odbcinst -d -q -n MonetDB >& /dev/null >& /dev/null; 
then
+    if [ -z "$2" ] || ! odbcinst -d -q -n MonetDB &> /dev/null; then
        odbcinst -i -d -r <<EOF
 [MonetDB]
 Description = ODBC for MonetDB
diff --git a/debian/monetdb5-sql.install b/debian/monetdb5-sql.install
--- a/debian/monetdb5-sql.install
+++ b/debian/monetdb5-sql.install
@@ -10,9 +10,11 @@ debian/tmp/usr/lib/monetdb5/sql_[!adh]*.
 debian/tmp/usr/lib/monetdb5/lib_sql.so usr/lib/monetdb5
 debian/tmp/var/monetdb5/dbfarm/.merovingian_properties var/monetdb5/dbfarm
 
-# usr/lib/monetdb5/createdb/*.sql EXCEPT: *_bam.sql, *_geom.sql, *_gsl.sql
+# usr/lib/monetdb5/createdb/*.sql EXCEPT: *_bam.sql, *_geom.sql, *_gsl.sql, 
*_hge.sql
 debian/tmp/usr/lib/monetdb5/createdb/??_[!abgju]*.sql usr/lib/monetdb5/createdb
 debian/tmp/usr/lib/monetdb5/createdb/??_analytics.sql usr/lib/monetdb5/createdb
 debian/tmp/usr/lib/monetdb5/createdb/??_json.sql usr/lib/monetdb5/createdb
 debian/tmp/usr/lib/monetdb5/createdb/??_generator.sql usr/lib/monetdb5/createdb
 debian/tmp/usr/lib/monetdb5/createdb/??_udf.sql usr/lib/monetdb5/createdb
+debian/tmp/usr/lib/monetdb5/createdb/??_uuid.sql usr/lib/monetdb5/createdb
+debian/tmp/usr/lib/monetdb5/createdb/??_url.sql usr/lib/monetdb5/createdb
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -379,7 +379,9 @@ BATgroup_internal(BAT **groups, BAT **ex
        Hash *hs = NULL;
        BUN hb;
        BUN maxgrps;
+#ifndef DISABLE_PARENT_HASH
        bat parent;
+#endif
 
        if (b == NULL || !BAThdense(b)) {
                GDKerror("BATgroup: b must be dense-headed\n");
@@ -760,9 +762,12 @@ BATgroup_internal(BAT **groups, BAT **ex
                GDKfree(sgrps);
        } else if (BATcheckhash(b) ||
                   (b->batPersistence == PERSISTENT &&
-                   BAThash(b, 0) == GDK_SUCCEED) ||
-                  ((parent = VIEWtparent(b)) != 0 &&
-                   BATcheckhash(BBPdescriptor(-parent)))) {
+                   BAThash(b, 0) == GDK_SUCCEED)
+#ifndef DISABLE_PARENT_HASH
+                  || ((parent = VIEWtparent(b)) != 0 &&
+                      BATcheckhash(BBPdescriptor(-parent)))
+#endif
+               ) {
                BUN lo, hi;
 
                /* we already have a hash table on b, or b is
@@ -778,6 +783,7 @@ BATgroup_internal(BAT **groups, BAT **ex
                                  e ? BATgetId(e) : "NULL", e ? BATcount(e) : 0,
                                  h ? BATgetId(h) : "NULL", h ? BATcount(h) : 0,
                                  subsorted);
+#ifndef DISABLE_PARENT_HASH
                if (b->T->hash == NULL && (parent = VIEWtparent(b)) != 0) {
                        /* b is a view on another bat (b2 for now).
                         * calculate the bounds [lo, hi) in the parent
@@ -788,7 +794,9 @@ BATgroup_internal(BAT **groups, BAT **ex
                        hseqb = b->hseqbase;
                        b = b2;
                        bi = bat_iterator(b);
-               } else {
+               } else
+#endif
+               {
                        lo = BUNfirst(b);
                        hi = BUNlast(b);
                }
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -1884,6 +1884,7 @@ hashjoin(BAT *r1, BAT *r2, BAT *l, BAT *
        }
 
        rl = BUNfirst(r);
+#ifndef DISABLE_PARENT_HASH
        if (VIEWtparent(r)) {
                BAT *b = BBPdescriptor(-VIEWtparent(r));
                if (b->batPersistence == PERSISTENT || BATcheckhash(b)) {
@@ -1904,6 +1905,7 @@ hashjoin(BAT *r1, BAT *r2, BAT *l, BAT *
                                        BATgetId(b), BATcount(b));
                }
        }
+#endif
        rh = rl + rend;
        rl += rstart;
        rseq += rstart;
@@ -2638,7 +2640,7 @@ bandjoin(BAT *r1, BAT *r2, BAT *l, BAT *
                        }
 #endif
 #endif
-#ifdef HAVE_HAVE
+#ifdef HAVE_HGE
                        case TYPE_hge: {
                                hge v1, v2;
                                int abort_on_error = 1;
@@ -2925,7 +2927,9 @@ BATsubjoin(BAT **r1p, BAT **r2p, BAT *l,
        BUN lsize, rsize;
        BUN maxsize;
        int lhash, rhash;
+#ifndef DISABLE_PARENT_HASH
        bat lparent, rparent;
+#endif
        int swap;
        size_t mem_size;
 
@@ -2966,19 +2970,25 @@ BATsubjoin(BAT **r1p, BAT **r2p, BAT *l,
        rsize = (BUN) (BATcount(r) * (Tsize(r)) + (r->T->vheap ? 
r->T->vheap->size : 0) + 2 * sizeof(BUN));
        mem_size = GDK_mem_maxsize / (GDKnr_threads ? GDKnr_threads : 1);
 
+#ifndef DISABLE_PARENT_HASH
        lparent = VIEWtparent(l);
-       rparent = VIEWtparent(r);
        if (lparent) {
                lpcount = BATcount(BBPdescriptor(lparent));
                lhash = BATcheckhash(l) || 
BATcheckhash(BBPdescriptor(-lparent));
-       } else {
+       } else
+#endif
+       {
                lpcount = BATcount(l);
                lhash = BATcheckhash(l);
        }
+#ifndef DISABLE_PARENT_HASH
+       rparent = VIEWtparent(r);
        if (rparent) {
                rpcount = BATcount(BBPdescriptor(rparent));
                rhash = BATcheckhash(r) || 
BATcheckhash(BBPdescriptor(-rparent));
-       } else {
+       } else
+#endif
+       {
                rpcount = BATcount(r);
                rhash = BATcheckhash(r);
        }
@@ -3017,21 +3027,33 @@ BATsubjoin(BAT **r1p, BAT **r2p, BAT *l,
                 * large (i.e. prefer hash over binary search, but
                 * only if the hash table doesn't cause thrashing) */
                return mergejoin(r1, r2, l, r, sl, sr, nil_matches, 0, 0, 0, 
maxsize);
-       } else if ((l->batPersistence == PERSISTENT ||
-                   (lparent != 0 &&
-                    BBPquickdesc(abs(lparent), 0)->batPersistence == 
PERSISTENT)) &&
-                  !(r->batPersistence == PERSISTENT ||
-                    (rparent != 0 &&
-                     BBPquickdesc(abs(rparent), 0)->batPersistence == 
PERSISTENT))) {
+       } else if ((l->batPersistence == PERSISTENT
+#ifndef DISABLE_PARENT_HASH
+                    || (lparent != 0 &&
+                        BBPquickdesc(abs(lparent), 0)->batPersistence == 
PERSISTENT)
+#endif
+                          ) &&
+                  !(r->batPersistence == PERSISTENT
+#ifndef DISABLE_PARENT_HASH
+                    || (rparent != 0 &&
+                        BBPquickdesc(abs(rparent), 0)->batPersistence == 
PERSISTENT)
+#endif
+                          )) {
                /* l (or its parent) is persistent and r is not,
                 * create hash on l since it may be reused */
                swap = 1;
-       } else if (!(l->batPersistence == PERSISTENT ||
-                   (lparent != 0 &&
-                    BBPquickdesc(abs(lparent), 0)->batPersistence == 
PERSISTENT)) &&
-                  (r->batPersistence == PERSISTENT ||
-                    (rparent != 0 &&
-                     BBPquickdesc(abs(rparent), 0)->batPersistence == 
PERSISTENT))) {
+       } else if (!(l->batPersistence == PERSISTENT
+#ifndef DISABLE_PARENT_HASH
+                    || (lparent != 0 &&
+                        BBPquickdesc(abs(lparent), 0)->batPersistence == 
PERSISTENT)
+#endif
+                          ) &&
+                  (r->batPersistence == PERSISTENT
+#ifndef DISABLE_PARENT_HASH
+                   || (rparent != 0 &&
+                       BBPquickdesc(abs(rparent), 0)->batPersistence == 
PERSISTENT)
+#endif
+                          )) {
                /* l (and its parent) is not persistent but r (or its
                 * parent) is, create hash on r since it may be
                 * reused */
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1167,7 +1167,7 @@ check_version(logger *lg, FILE *fp)
        if (version != lg->version) {
                if (lg->prefuncp == NULL ||
                    (*lg->prefuncp)(version, lg->version) != 0) {
-                       GDKerror("Incompatible database version %06d, "
+                       GDKfatal("Incompatible database version %06d, "
                                 "this server supports version %06d.\n%s",
                                 version, lg->version,
                                 version < lg->version ? "Maybe you need to 
upgrade to an intermediate release first.\n" : "");
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -12,6 +12,8 @@
 #error this file should not be included outside its source directory
 #endif
 
+/* #define DISABLE_PARENT_HASH 1 */
+
 #include "gdk_system_private.h"
 
 enum heaptype {
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -176,6 +176,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, 
        seq = b->hseqbase;
        l = BUNfirst(b);
        h = BUNlast(b);
+#ifndef DISABLE_PARENT_HASH
        if (VIEWtparent(b)) {
                BAT *b2 = BBPdescriptor(-VIEWtparent(b));
                if (b2->batPersistence == PERSISTENT || BATcheckhash(b2)) {
@@ -197,6 +198,7 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, 
                                        BATgetId(b2), BATcount(b2));
                }
        }
+#endif
        if (s && BATtdense(s)) {
                /* no need for binary search in s, we just adjust the
                 * boundaries */
@@ -1616,18 +1618,27 @@ BATsubselect(BAT *b, BAT *s, const void 
         * persistent and the total size wouldn't be too large; check
         * for existence of hash last since that may involve I/O */
        hash = equi &&
-               (((b->batPersistence == PERSISTENT ||
-                 (parent != 0 &&
-                  BBPquickdesc(abs(parent),0)->batPersistence == PERSISTENT)) 
&&
+               (((b->batPersistence == PERSISTENT
+#ifndef DISABLE_PARENT_HASH
+                  || (parent != 0 &&
+                      BBPquickdesc(abs(parent),0)->batPersistence == 
PERSISTENT)
+#endif
+                         ) &&
                 (size_t) ATOMsize(b->ttype) >= sizeof(BUN) / 4 &&
                  BATcount(b) * (ATOMsize(b->ttype) + 2 * sizeof(BUN)) < 
GDK_mem_maxsize / 2) ||
-                (BATcheckhash(b) ||
-                 (parent != 0 &&
-                  BATcheckhash(BBPdescriptor(-parent)))));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to