Changeset: 7a4e0e8d8a30 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a4e0e8d8a30 Added Files: sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out sql/test/BugTracker-2018/Tests/truncate_tmp_tables.Bug-6543.reqtests sql/test/BugTracker-2018/Tests/truncate_tmp_tables.Bug-6543.sql sql/test/BugTracker-2018/Tests/truncate_tmp_tables.Bug-6543.stable.err sql/test/BugTracker-2018/Tests/truncate_tmp_tables.Bug-6543.stable.out Modified Files: clients/mapiclient/mclient.c gdk/gdk.h gdk/gdk_bat.c gdk/gdk_cand.h gdk/gdk_join.c sql/backends/monet5/rel_bin.c sql/backends/monet5/vaults/bam/Tests/mergetable.stable.out sql/backends/monet5/vaults/fits/fits.c sql/server/rel_psm.c sql/server/rel_rel.c sql/test/BugTracker-2010/Tests/prepare_stmt.Bug-2533.Bug-2534.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out sql/test/BugTracker-2015/Tests/quantile_function_resolution.Bug-3773.stable.out sql/test/BugTracker-2016/Tests/decimal_vs_integer.Bug-3941.stable.out sql/test/BugTracker-2016/Tests/rename_exps.Bug-3974.stable.out sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out.single sql/test/BugTracker-2018/Tests/All sql/test/BugTracker-2018/Tests/count_from_commented_function_signatures.Bug-6542.stable.out sql/test/BugTracker-2018/Tests/truncate_sys_tables.Bug-6543.sql sql/test/BugTracker-2018/Tests/truncate_sys_tables.Bug-6543.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-0join-query.stable.out sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-0join-view.stable.out sql/test/Skyserver/Tests/Skyserver.stable.out sql/test/VOC/Tests/VOC.stable.out sql/test/pg_regress/Tests/alter_table.stable.err sql/test/pg_regress/Tests/alter_table.stable.out sql/test/pg_regress/Tests/random.stable.out sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.stable.out sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.sql sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.out Branch: default Log Message:
Merge with Mar2018 branch. diffs (truncated from 3414 to 300 lines): diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -269,7 +269,7 @@ timerHuman(int64_t sqloptimizer, int64_t /* * report only the times we do actually measure: - * - client-measured wall-clock time per query only when executing indivual queries, + * - client-measured wall-clock time per query only when executing individual queries, * otherwise only the total wall-clock time at the end of a batch; * - server-measured detailed performance measures only per query. */ diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -345,23 +345,14 @@ #define GDKisalnum(c) isalnum((unsigned char) (c)) #define GDKisdigit(c) isdigit((unsigned char) (c)) -#define TEMPDIR_NAME "TEMP_DATA" +#define BATDIR "bat" +#define TEMPDIR_NAME "TEMP_DATA" -#ifndef NATIVE_WIN32 -#define BATDIR "bat" -#define DELDIR "bat/DELETE_ME" -#define BAKDIR "bat/BACKUP" -#define SUBDIR "bat/BACKUP/SUBCOMMIT" -#define LEFTDIR "bat/LEFTOVERS" -#define TEMPDIR "bat/"TEMPDIR_NAME -#else -#define BATDIR "bat" -#define DELDIR "bat\\DELETE_ME" -#define BAKDIR "bat\\BACKUP" -#define SUBDIR "bat\\BACKUP\\SUBCOMMIT" -#define LEFTDIR "bat\\LEFTOVERS" -#define TEMPDIR "bat\\"TEMPDIR_NAME -#endif +#define DELDIR BATDIR DIR_SEP_STR "DELETE_ME" +#define BAKDIR BATDIR DIR_SEP_STR "BACKUP" +#define SUBDIR BAKDIR DIR_SEP_STR "SUBCOMMIT" /* note K, not T */ +#define LEFTDIR BATDIR DIR_SEP_STR "LEFTOVERS" +#define TEMPDIR BATDIR DIR_SEP_STR TEMPDIR_NAME /* See `man mserver5` or tools/mserver/mserver5.1 @@ -770,7 +761,7 @@ typedef struct { unsigned short width; /* byte-width of the atom array */ bte type; /* type id. */ bte shift; /* log2 of bun width */ - bool varsized:1, /* varsized/void (1) or fixedsized (0) */ + bool varsized:1, /* varsized/void (true) or fixedsized (false) */ key:1, /* no duplicate values present */ unique:1, /* no duplicate values allowed */ nonil:1, /* there are no nils in the column */ @@ -1053,7 +1044,7 @@ gdk_export bte ATOMelmshift(int sz); } else { \ ATOMputFIX((b)->ttype, (p), v); \ } \ - } while (0) + } while (false) #define Treplacevalue(b, p, v) \ do { \ if ((b)->tvarsized && (b)->ttype) { \ @@ -1078,7 +1069,7 @@ gdk_export bte ATOMelmshift(int sz); if ((b)->twidth < SIZEOF_VAR_T && \ ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= ((size_t) 1 << (8 * (b)->twidth))) { \ /* doesn't fit in current heap, upgrade it */ \ - if (GDKupgradevarheap((b), _d, 0, (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ + if (GDKupgradevarheap((b), _d, false, (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ goto bunins_failed; \ } \ _ptr = (p); \ @@ -1099,7 +1090,7 @@ gdk_export bte ATOMelmshift(int sz); } else { \ ATOMreplaceFIX((b)->ttype, (p), v); \ } \ - } while (0) + } while (false) #else #define Tputvalue(b, p, v, copyall) \ do { \ @@ -1128,7 +1119,7 @@ gdk_export bte ATOMelmshift(int sz); } else { \ ATOMputFIX((b)->ttype, (p), v); \ } \ - } while (0) + } while (false) #define Treplacevalue(b, p, v) \ do { \ if ((b)->tvarsized && (b)->ttype) { \ @@ -1150,7 +1141,7 @@ gdk_export bte ATOMelmshift(int sz); if ((b)->twidth < SIZEOF_VAR_T && \ ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= ((size_t) 1 << (8 * (b)->twidth))) { \ /* doesn't fit in current heap, upgrade it */ \ - if (GDKupgradevarheap((b), _d, 0, (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ + if (GDKupgradevarheap((b), _d, false, (b)->batRestricted == BAT_READ) != GDK_SUCCEED) \ goto bunins_failed; \ } \ _ptr = (p); \ @@ -1168,26 +1159,26 @@ gdk_export bte ATOMelmshift(int sz); } else { \ ATOMreplaceFIX((b)->ttype, (p), v); \ } \ - } while (0) + } while (false) #endif #define tfastins_nocheck(b, p, v, s) \ do { \ (b)->theap.free += (s); \ (b)->theap.dirty |= (s) != 0; \ Tputvalue((b), Tloc((b), (p)), (v), 0); \ - } while (0) + } while (false) #define bunfastapp_nocheck(b, p, t, ts) \ do { \ tfastins_nocheck(b, p, t, ts); \ (b)->batCount++; \ - } while (0) + } while (false) #define bunfastapp_nocheck_inc(b, p, t) \ do { \ bunfastapp_nocheck(b, p, t, Tsize(b)); \ p++; \ - } while (0) + } while (false) #define bunfastapp(b, t) \ do { \ @@ -1201,7 +1192,7 @@ gdk_export bte ATOMelmshift(int sz); goto bunins_failed; \ } \ bunfastapp_nocheck(b, _p, t, Tsize(b)); \ - } while (0) + } while (false) gdk_export gdk_return GDKupgradevarheap(BAT *b, var_t v, int copyall, int mayshare) __attribute__ ((__warn_unused_result__)); @@ -1347,10 +1338,10 @@ gdk_export gdk_return BATsetaccess(BAT * gdk_export int BATgetaccess(BAT *b); -#define BATdirty(b) ((b)->batCopiedtodisk == 0 || (b)->batDirty || \ +#define BATdirty(b) (!(b)->batCopiedtodisk || (b)->batDirty || \ (b)->batDirtydesc || \ (b)->theap.dirty || \ - ((b)->tvheap?(b)->tvheap->dirty:0)) + ((b)->tvheap?(b)->tvheap->dirty:false)) #define PERSISTENT 0 #define TRANSIENT 1 @@ -1476,31 +1467,31 @@ gdk_export void GDKqsort_rev(void *restr #define BATsettrivprop(b) \ do { \ assert(!is_oid_nil((b)->hseqbase)); \ - (b)->batDirtydesc = 1; /* likely already set */ \ + (b)->batDirtydesc = true; /* likely already set */ \ assert(is_oid_nil((b)->tseqbase) || \ ATOMtype((b)->ttype) == TYPE_oid); \ if ((b)->ttype == TYPE_void) { \ if (is_oid_nil((b)->tseqbase)) { \ (b)->tnonil = (b)->batCount == 0; \ (b)->tnil = !(b)->tnonil; \ - (b)->trevsorted = 1; \ + (b)->trevsorted = true; \ (b)->tkey = (b)->batCount <= 1; \ } else { \ - (b)->tnonil = 1; \ - (b)->tnil = 0; \ - (b)->tkey = 1; \ + (b)->tnonil = true; \ + (b)->tnil = false; \ + (b)->tkey = true; \ (b)->trevsorted = (b)->batCount <= 1; \ } \ - (b)->tsorted = 1; \ + (b)->tsorted = true; \ } else if ((b)->batCount <= 1) { \ if (ATOMlinear((b)->ttype)) { \ - (b)->tsorted = 1; \ - (b)->trevsorted = 1; \ + (b)->tsorted = true; \ + (b)->trevsorted = true; \ } \ - (b)->tkey = 1; \ + (b)->tkey = true; \ if ((b)->batCount == 0) { \ - (b)->tnonil = 1; \ - (b)->tnil = 0; \ + (b)->tnonil = true; \ + (b)->tnil = false; \ if ((b)->ttype == TYPE_oid) { \ (b)->tseqbase = 0; \ } \ @@ -1508,20 +1499,20 @@ gdk_export void GDKqsort_rev(void *restr /* b->batCount == 1 */ \ oid sqbs = ((const oid *) (b)->theap.base)[0]; \ if (is_oid_nil(sqbs)) { \ - (b)->tnonil = 0; \ - (b)->tnil = 1; \ + (b)->tnonil = false; \ + (b)->tnil = true; \ } else { \ - (b)->tnonil = 1; \ - (b)->tnil = 0; \ + (b)->tnonil = true; \ + (b)->tnil = false; \ } \ (b)->tseqbase = sqbs; \ } \ } \ if (!ATOMlinear((b)->ttype)) { \ - (b)->tsorted = 0; \ - (b)->trevsorted = 0; \ + (b)->tsorted = false; \ + (b)->trevsorted = false; \ } \ - } while (0) + } while (false) /* * @+ BAT Buffer Pool @@ -2567,7 +2558,7 @@ gdk_export void VIEWbounds(BAT *b, BAT * (y), BATgetId(x)); \ return (e); \ } \ - } while (0) + } while (false) /* The batRestricted field indicates whether a BAT is readonly. * we have modes: BAT_WRITE = all permitted diff --git a/gdk/gdk_cand.h b/gdk/gdk_cand.h --- a/gdk/gdk_cand.h +++ b/gdk/gdk_cand.h @@ -11,9 +11,8 @@ * and s (the candidate list). Start and end are the start and end * BUNs of b that need to be considered. They are relative to the * start of the heap. Cand and candend point into the candidate list, - * if present. Note that if the tail of the candidate list is dense, - * cand and candend are set to NULL and start and end are adjusted - * instead. */ + * if present. Note that if the candidate list is dense, cand and + * candend are set to NULL and start and end are adjusted instead. */ #define CANDINIT(b, s, start, end, cnt, cand, candend) \ do { \ start = 0; \ diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -103,8 +103,8 @@ joinparamcheck(BAT *l, BAT *r1, BAT *r2, /* Create the result bats for a join, returns the absolute maximum * number of outputs that could possibly be generated. */ static BUN -joininitresults(BAT **r1p, BAT **r2p, BUN lcnt, BUN rcnt, int lkey, int rkey, - int semi, int nil_on_miss, int only_misses, BUN estimate) +joininitresults(BAT **r1p, BAT **r2p, BUN lcnt, BUN rcnt, bool lkey, bool rkey, + bool semi, bool nil_on_miss, bool only_misses, BUN estimate) { BAT *r1, *r2; BUN maxsize, size; @@ -175,11 +175,11 @@ joininitresults(BAT **r1p, BAT **r2p, BU if (r1 == NULL) { return BUN_NONE; } - r1->tnil = 0; - r1->tnonil = 1; - r1->tkey = 1; - r1->tsorted = 1; - r1->trevsorted = 1; + r1->tnil = false; + r1->tnonil = true; + r1->tkey = true; + r1->tsorted = true; + r1->trevsorted = true; r1->tseqbase = 0; *r1p = r1; if (r2p) { @@ -188,11 +188,11 @@ joininitresults(BAT **r1p, BAT **r2p, BU BBPreclaim(r1); return BUN_NONE; } - r2->tnil = 0; - r2->tnonil = 1; - r2->tkey = 1; - r2->tsorted = 1; - r2->trevsorted = 1; + r2->tnil = false; + r2->tnonil = true; + r2->tkey = true; + r2->tsorted = true; + r2->trevsorted = true; r2->tseqbase = 0; *r2p = r2; } @@ -209,33 +209,33 @@ joininitresults(BAT **r1p, BAT **r2p, BU static gdk_return nomatch(BAT *r1, BAT *r2, BAT *l, BAT *r, BUN lstart, BUN lend, const oid *lcand, const oid *lcandend, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list