Changeset: 3fb08acae49b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fb08acae49b
Modified Files:
        gdk/gdk_calc.c
        gdk/gdk_calc_compare.h
        gdk/gdk_search.c
        gdk/gdk_storage.c
        java/ChangeLog
        java/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java
        java/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
        java/tests/build.xml
        
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.single
        monetdb5/modules/mal/Tests/inspect05.stable.out
        monetdb5/modules/mal/Tests/remote03.stable.err
        monetdb5/modules/mal/Tests/remote03.stable.out
        monetdb5/modules/mal/tablet.c
        monetdb5/optimizer/Tests/All
        monetdb5/optimizer/Tests/manifold2.stable.out.single
        sql/backends/monet5/generator/Tests/joins00.sql
        sql/backends/monet5/generator/Tests/joins01.sql
        sql/backends/monet5/generator/Tests/joins01.stable.out
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql_result.c
        sql/backends/monet5/sql_upgrades.c
        sql/benchmarks/ssbm/Tests/01-explain.stable.out
        sql/benchmarks/ssbm/Tests/02-explain.stable.out
        sql/benchmarks/ssbm/Tests/03-explain.stable.out
        sql/benchmarks/ssbm/Tests/04-explain.stable.out
        sql/benchmarks/ssbm/Tests/05-explain.stable.out
        sql/benchmarks/ssbm/Tests/06-explain.stable.out
        sql/benchmarks/ssbm/Tests/07-explain.stable.out
        sql/benchmarks/ssbm/Tests/08-explain.stable.out
        sql/benchmarks/ssbm/Tests/09-explain.stable.out
        sql/benchmarks/ssbm/Tests/10-explain.stable.out
        sql/benchmarks/ssbm/Tests/11-explain.stable.out
        sql/benchmarks/ssbm/Tests/12-explain.stable.out
        sql/benchmarks/ssbm/Tests/13-explain.stable.out
        sql/benchmarks/tpch/Tests/01-explain.stable.out
        sql/benchmarks/tpch/Tests/01-explain.stable.out.32bit
        sql/benchmarks/tpch/Tests/03-explain.stable.out
        sql/benchmarks/tpch/Tests/04-explain.stable.out.32bit
        sql/benchmarks/tpch/Tests/05-explain.stable.out
        sql/benchmarks/tpch/Tests/05-explain.stable.out.32bit
        sql/benchmarks/tpch/Tests/06-explain.stable.out
        sql/benchmarks/tpch/Tests/07-explain.stable.out
        sql/benchmarks/tpch/Tests/08-explain.stable.out
        sql/benchmarks/tpch/Tests/09-explain.stable.out
        sql/benchmarks/tpch/Tests/10-explain.stable.out
        sql/benchmarks/tpch/Tests/11-explain.stable.out
        sql/benchmarks/tpch/Tests/12-explain.stable.out
        sql/benchmarks/tpch/Tests/14-explain.stable.out
        sql/benchmarks/tpch/Tests/15-explain.stable.out
        sql/benchmarks/tpch/Tests/16-explain.stable.out.32bit
        sql/benchmarks/tpch/Tests/17-explain.stable.out
        sql/benchmarks/tpch/Tests/18-explain.stable.out
        sql/benchmarks/tpch/Tests/19-explain.stable.out
        sql/benchmarks/tpch/Tests/20-explain.stable.out
        sql/benchmarks/tpch/Tests/20-explain.stable.out.32bit
        sql/benchmarks/tpch/Tests/22-explain.stable.out
        sql/benchmarks/tpch/Tests/22-explain.stable.out.32bit
        sql/server/rel_optimizer.c
        sql/server/rel_select.c
        sql/server/rel_select.h
        sql/storage/store.c
        
sql/test/BugTracker-2010/Tests/group-by_ordered_column.Bug-2564.stable.out.32bit
        
sql/test/BugTracker-2011/Tests/bulk_rotate_xor_hash-error.Bug-2734.stable.out
        sql/test/BugTracker-2011/Tests/cast-crash.Bug-2678.stable.out
        sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
        sql/test/BugTracker-2011/Tests/predicate.Bug-2908.stable.out
        sql/test/BugTracker-2011/Tests/sqltables.Bug-2921.stable.out
        sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out
        sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.single
        sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out.single
        
sql/test/BugTracker-2016/Tests/LEFT-JOIN_with_OR_conditions_triggers_assertion.Bug-3908.stable.out
        
sql/test/BugTracker-2016/Tests/incorrect_column_name_in_OR_condition_of_LEFT-JOIN_crashes_mserver.Bug-3909.stable.err
        sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out.32bit
        sql/test/BugTracker/Tests/rank_over.SF-1691098.stable.out
        sql/test/Tests/median_stdev.sql
        tools/merovingian/daemon/connections.c
        tools/merovingian/daemon/connections.h
        tools/merovingian/daemon/merovingian.c
Branch: embedded
Log Message:

merge


diffs (truncated from 6634 to 300 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -124,14 +124,16 @@ checkbats(BAT *b1, BAT *b2, const char *
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start);      \
                for (i = start * incr1, j = start * incr2, k = start;   \
                     k < end; i += incr1, j += incr2, k++) {            \
+                       register TYPE1 v1;                              \
+                       register TYPE2 v2;                              \
                        CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
-                       if (((const TYPE1 *) lft)[i] == TYPE1##_nil ||  \
-                           ((const TYPE2 *) rgt)[j] == TYPE2##_nil) {  \
+                       v1 = ((const TYPE1 *) lft)[i];                  \
+                       v2 = ((const TYPE2 *) rgt)[j];                  \
+                       if (v1 == TYPE1##_nil || v2 == TYPE2##_nil) {   \
                                nils++;                                 \
                                ((TYPE3 *) dst)[k] = TYPE3##_nil;       \
                        } else {                                        \
-                               ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *) 
lft)[i], \
-                                                         ((const TYPE2 *) 
rgt)[j]); \
+                               ((TYPE3 *) dst)[k] = FUNC(v1, v2);      \
                        }                                               \
                }                                                       \
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt);      \
@@ -141,9 +143,14 @@ checkbats(BAT *b1, BAT *b2, const char *
        do {                                                            \
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start);      \
                for (i = start * incr1, j = start * incr2, k = start;   \
-                    k < end; i += incr1, j += incr2, k++)              \
-                       ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *) lft)[i], \
-                                                 ((const TYPE2 *) rgt)[j]); \
+                    k < end; i += incr1, j += incr2, k++) {            \
+                       register TYPE1 v1;                              \
+                       register TYPE2 v2;                              \
+                       CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
+                       v1 = ((const TYPE1 *) lft)[i];                  \
+                       v2 = ((const TYPE2 *) rgt)[j];                  \
+                       ((TYPE3 *) dst)[k] = FUNC(v1, v2);              \
+               }                                                       \
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt);      \
        } while (0)
 
@@ -152,26 +159,27 @@ checkbats(BAT *b1, BAT *b2, const char *
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, 0, start);      \
                for (i = start * incr1, j = start * incr2, k = start;   \
                     k < end; i += incr1, j += incr2, k++) {            \
+                       register TYPE1 v1;                              \
+                       register TYPE2 v2;                              \
                        CHECKCAND((TYPE3 *) dst, k, candoff, TYPE3##_nil); \
-                       if (((const TYPE1 *) lft)[i] == TYPE1##_nil ||  \
-                           ((const TYPE2 *) rgt)[j] == TYPE2##_nil) {  \
+                       v1 = ((const TYPE1 *) lft)[i];                  \
+                       v2 = ((const TYPE2 *) rgt)[j];                  \
+                       if (v1 == TYPE1##_nil || v2 == TYPE2##_nil) {   \
                                nils++;                                 \
                                ((TYPE3 *) dst)[k] = TYPE3##_nil;       \
-                       } else if (CHECK(((const TYPE1 *) lft)[i],      \
-                                        ((const TYPE2 *) rgt)[j])) {   \
+                       } else if (CHECK(v1, v2)) {                     \
                                if (abort_on_error) {                   \
                                        GDKerror("%s: shift operand too large 
in " \
                                                 
#FUNC"("FMT##TYPE1","FMT##TYPE2").\n", \
                                                 func,                  \
-                                                CST##TYPE1 ((const TYPE1 *) 
lft)[i], \
-                                                CST##TYPE2 ((const TYPE2 *) 
rgt)[j]); \
+                                                CST##TYPE1 v1,         \
+                                                CST##TYPE2 v2);        \
                                        goto checkfail;                 \
                                }                                       \
                                ((TYPE3 *)dst)[k] = TYPE3##_nil;        \
                                nils++;                                 \
                        } else {                                        \
-                               ((TYPE3 *) dst)[k] = FUNC(((const TYPE1 *) 
lft)[i], \
-                                                         ((const TYPE2 *) 
rgt)[j]); \
+                               ((TYPE3 *) dst)[k] = FUNC(v1, v2);      \
                        }                                               \
                }                                                       \
                CANDLOOP((TYPE3 *) dst, k, TYPE3##_nil, end, cnt);      \
@@ -12407,13 +12415,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      lt_typeswitchloop
 #define BATcalcop_intern       BATcalclt_intern
 #define BATcalcop              BATcalclt
-#define BATcalcop_name         "BATcalclt"
 #define BATcalcopcst           BATcalcltcst
-#define BATcalcopcst_name      "BATcalcltcst"
 #define BATcalccstop           BATcalccstlt
-#define BATcalccstop_name      "BATcalccstlt"
 #define VARcalcop              VARcalclt
-#define VARcalcop_name         "VARcalclt"
 
 #include "gdk_calc_compare.h"
 
@@ -12421,13 +12425,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 /* ---------------------------------------------------------------------- */
 /* greater than (any "linear" type) */
@@ -12436,13 +12436,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      gt_typeswitchloop
 #define BATcalcop_intern       BATcalcgt_intern
 #define BATcalcop              BATcalcgt
-#define BATcalcop_name         "BATcalcgt"
 #define BATcalcopcst           BATcalcgtcst
-#define BATcalcopcst_name      "BATcalcgtcst"
 #define BATcalccstop           BATcalccstgt
-#define BATcalccstop_name      "BATcalccstgt"
 #define VARcalcop              VARcalcgt
-#define VARcalcop_name         "VARcalclt"
 
 #include "gdk_calc_compare.h"
 
@@ -12450,13 +12446,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 /* ---------------------------------------------------------------------- */
 /* less than or equal (any "linear" type) */
@@ -12467,13 +12459,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      le_typeswitchloop
 #define BATcalcop_intern       BATcalcle_intern
 #define BATcalcop              BATcalcle
-#define BATcalcop_name         "BATcalcle"
 #define BATcalcopcst           BATcalclecst
-#define BATcalcopcst_name      "BATcalclecst"
 #define BATcalccstop           BATcalccstle
-#define BATcalccstop_name      "BATcalccstle"
 #define VARcalcop              VARcalcle
-#define VARcalcop_name         "VARcalcle"
 
 #include "gdk_calc_compare.h"
 
@@ -12481,13 +12469,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 /* ---------------------------------------------------------------------- */
 /* greater than or equal (any "linear" type) */
@@ -12498,13 +12482,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      ge_typeswitchloop
 #define BATcalcop_intern       BATcalcge_intern
 #define BATcalcop              BATcalcge
-#define BATcalcop_name         "BATcalcge"
 #define BATcalcopcst           BATcalcgecst
-#define BATcalcopcst_name      "BATcalcgecst"
 #define BATcalccstop           BATcalccstge
-#define BATcalccstop_name      "BATcalccstge"
 #define VARcalcop              VARcalcge
-#define VARcalcop_name         "VARcalcge"
 
 #include "gdk_calc_compare.h"
 
@@ -12512,13 +12492,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 /* ---------------------------------------------------------------------- */
 /* equal (any type) */
@@ -12529,13 +12505,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      eq_typeswitchloop
 #define BATcalcop_intern       BATcalceq_intern
 #define BATcalcop              BATcalceq
-#define BATcalcop_name         "BATcalceq"
 #define BATcalcopcst           BATcalceqcst
-#define BATcalcopcst_name      "BATcalceqcst"
 #define BATcalccstop           BATcalccsteq
-#define BATcalccstop_name      "BATcalccsteq"
 #define VARcalcop              VARcalceq
-#define VARcalcop_name         "VARcalceq"
 
 #include "gdk_calc_compare.h"
 
@@ -12543,13 +12515,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 /* ---------------------------------------------------------------------- */
 /* not equal (any type) */
@@ -12560,13 +12528,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      ne_typeswitchloop
 #define BATcalcop_intern       BATcalcne_intern
 #define BATcalcop              BATcalcne
-#define BATcalcop_name         "BATcalcne"
 #define BATcalcopcst           BATcalcnecst
-#define BATcalcopcst_name      "BATcalcnecst"
 #define BATcalccstop           BATcalccstne
-#define BATcalccstop_name      "BATcalccstne"
 #define VARcalcop              VARcalcne
-#define VARcalcop_name         "VARcalcne"
 
 #include "gdk_calc_compare.h"
 
@@ -12574,13 +12538,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 #undef TYPE_TPE
 #undef TPE
@@ -12589,7 +12549,8 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 /* ---------------------------------------------------------------------- */
 /* generic comparison (any "linear" type) */
 
-#define CMP(a, b)      ((bte) ((a) < (b) ? -1 : (a) > (b)))
+/* #define CMP(a, b)   ((bte) ((a) < (b) ? -1 : (a) > (b))) */
+#define CMP(a, b)      ((bte) (((a) > (b)) - ((a) < (b))))
 
 #define TYPE_TPE               TYPE_bte
 #define TPE                    bte
@@ -12599,13 +12560,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #define op_typeswitchloop      cmp_typeswitchloop
 #define BATcalcop_intern       BATcalccmp_intern
 #define BATcalcop              BATcalccmp
-#define BATcalcop_name         "BATcalccmp"
 #define BATcalcopcst           BATcalccmpcst
-#define BATcalcopcst_name      "BATcalccmpcst"
 #define BATcalccstop           BATcalccstcmp
-#define BATcalccstop_name      "BATcalccstcmp"
 #define VARcalcop              VARcalccmp
-#define VARcalcop_name         "VARcalccmp"
 
 #include "gdk_calc_compare.h"
 
@@ -12613,13 +12570,9 @@ VARcalcrsh(ValPtr ret, const ValRecord *
 #undef op_typeswitchloop
 #undef BATcalcop_intern
 #undef BATcalcop
-#undef BATcalcop_name
 #undef BATcalcopcst
-#undef BATcalcopcst_name
 #undef BATcalccstop
-#undef BATcalccstop_name
 #undef VARcalcop
-#undef VARcalcop_name
 
 #undef TYPE_TPE
 #undef TPE
diff --git a/gdk/gdk_calc_compare.h b/gdk/gdk_calc_compare.h
--- a/gdk/gdk_calc_compare.h
+++ b/gdk/gdk_calc_compare.h
@@ -629,10 +629,10 @@ BATcalcop(BAT *b1, BAT *b2, BAT *s)
        BUN start, end, cnt;
        const oid *restrict cand = NULL, *candend = NULL;
 
-       BATcheck(b1, BATcalcop_name, NULL);
-       BATcheck(b2, BATcalcop_name, NULL);
+       BATcheck(b1, __func__, NULL);
+       BATcheck(b2, __func__, NULL);
 
-       if (checkbats(b1, b2, BATcalcop_name) != GDK_SUCCEED)
+       if (checkbats(b1, b2, __func__) != GDK_SUCCEED)
                return NULL;
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to