Changeset: 2add8edb72d1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2add8edb72d1 Modified Files: gdk/gdk.h gdk/gdk_bat.c gdk/gdk_bbp.c gdk/gdk_heap.c gdk/gdk_storage.c gdk/gdk_strimps.c gdk/gdk_utils.c gdk/gdk_utils.h sql/server/rel_select.c Branch: default Log Message:
Merge with Jun2023 branch. diffs (truncated from 1330 to 300 lines): diff --git a/clients/odbc/driver/SQLTables.c b/clients/odbc/driver/SQLTables.c --- a/clients/odbc/driver/SQLTables.c +++ b/clients/odbc/driver/SQLTables.c @@ -234,7 +234,7 @@ MNDBTables(ODBCStmt *stmt, strcpy(buf, "LOCAL TEMPORARY TABLE"); } pos += snprintf(query + pos, querylen - pos, "'%s',", buf); - j = 0; + j = 0; } else if (j < sizeof(buf) && TableType[i] != '\'' && (TableType[i] != ' ' || diff --git a/clients/odbc/tests/ODBCmetadata.c b/clients/odbc/tests/ODBCmetadata.c --- a/clients/odbc/tests/ODBCmetadata.c +++ b/clients/odbc/tests/ODBCmetadata.c @@ -114,7 +114,7 @@ nameofSQLtype(SQLSMALLINT dataType) case SQL_REAL: return "REAL"; case SQL_FLOAT: return "FLOAT"; case SQL_DOUBLE: return "DOUBLE"; - case SQL_BIT: return "BOOLEAN"; /* MonetDB boolean type is mapped to SQL_BIT in ODBC (see msql_types[] in SQLExecute.c) */ + case SQL_BIT: return "BOOLEAN"; /* MonetDB boolean type is mapped to SQL_BIT in ODBC (see msql_types[] in SQLExecute.c) */ case SQL_TINYINT: return "TINYINT"; case SQL_BIGINT: return "BIGINT"; case SQL_BINARY: return "BINARY"; @@ -125,7 +125,7 @@ nameofSQLtype(SQLSMALLINT dataType) case SQL_TYPE_TIME: return "TIME"; case SQL_TYPE_TIMESTAMP: return "TIMESTAMP"; case SQL_INTERVAL_MONTH: return "INTERVAL MONTH"; - case SQL_INTERVAL_YEAR: return "INTERVAL YEAR"; + case SQL_INTERVAL_YEAR: return "INTERVAL YEAR"; case SQL_INTERVAL_YEAR_TO_MONTH: return "INTERVAL YEAR TO MONTH"; case SQL_INTERVAL_DAY: return "INTERVAL DAY"; case SQL_INTERVAL_HOUR: return "INTERVAL HOUR"; diff --git a/ctest/monetdb5/mal/test_malEmbeddedBoot.c b/ctest/monetdb5/mal/test_malEmbeddedBoot.c --- a/ctest/monetdb5/mal/test_malEmbeddedBoot.c +++ b/ctest/monetdb5/mal/test_malEmbeddedBoot.c @@ -21,7 +21,7 @@ main(void) if (BBPaddfarm(NULL, (1U << PERSISTENT) | (1U << TRANSIENT), false) != GDK_SUCCEED) { /* set in memory dbfarm */ createException(MAL, "embedded.monetdb_startup", "BBPaddfram() failed"); - return 1; + return 1; } gdk_res = GDKinit(NULL, 0, true, NULL); diff --git a/ctest/monetdb5/mal/test_malInclude.c b/ctest/monetdb5/mal/test_malInclude.c --- a/ctest/monetdb5/mal/test_malInclude.c +++ b/ctest/monetdb5/mal/test_malInclude.c @@ -21,13 +21,13 @@ main(void) if (BBPaddfarm(NULL, (1U << PERSISTENT) | (1U << TRANSIENT), false) != GDK_SUCCEED) { /* set in memory dbfarm */ createException(MAL, "embedded.monetdb_startup", "BBPaddfram() failed"); - return 1; + return 1; } gdk_res = GDKinit(NULL, 0, true, NULL); if (gdk_res != GDK_SUCCEED) { createException(MAL, "embedded.monetdb_startup", "GDKinit() failed"); - return 1; + return 1; } char *modules[2]; modules[0] = "sql"; diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -797,7 +797,7 @@ typedef struct BAT { batTransient:1, /* should the BAT persist on disk? */ batCopiedtodisk:1; /* once written */ uint16_t selcnt; /* how often used in equi select without hash */ - uint16_t unused; /* value=0 for now (sneakily used by mat.c) */ + uint16_t unused; /* value=0 for now (sneakily used by mat.c) */ /* delta status administration */ BUN batInserted; /* start of inserted elements */ @@ -1644,20 +1644,20 @@ BATsettrivprop(BAT *b) static inline void BATnegateprops(BAT *b) { - /* disable all properties here */ - b->tnonil = false; - b->tnil = false; - if (b->ttype) { - b->tsorted = false; - b->trevsorted = false; - b->tnosorted = 0; - b->tnorevsorted = 0; - } - b->tseqbase = oid_nil; - b->tkey = false; - b->tnokey[0] = 0; - b->tnokey[1] = 0; - b->tmaxpos = b->tminpos = BUN_NONE; + /* disable all properties here */ + b->tnonil = false; + b->tnil = false; + if (b->ttype) { + b->tsorted = false; + b->trevsorted = false; + b->tnosorted = 0; + b->tnorevsorted = 0; + } + b->tseqbase = oid_nil; + b->tkey = false; + b->tnokey[0] = 0; + b->tnokey[1] = 0; + b->tmaxpos = b->tminpos = BUN_NONE; } /* @@ -2218,7 +2218,7 @@ gdk_export void VIEWbounds(BAT *b, BAT * if (!(f)) { \ MT_lock_set(&(x)->theaplock); \ if ((x)->batRestricted == BAT_READ || \ - ((ATOMIC_GET(&(x)->theap->refs) & HEAPREFS) > 1)) { \ + ((ATOMIC_GET(&(x)->theap->refs) & HEAPREFS) > 1)) { \ GDKerror("access denied to %s, aborting.\n", BATgetId(x)); \ MT_lock_unset(&(x)->theaplock); \ return (e); \ diff --git a/gdk/gdk_analytic.h b/gdk/gdk_analytic.h --- a/gdk/gdk_analytic.h +++ b/gdk/gdk_analytic.h @@ -75,8 +75,8 @@ gdk_export gdk_return GDKrebuild_segment } \ } \ \ - while (current_level < nlevels) { /* for the following levels we have to use the previous level results */ \ - oid prev_tree_offset = tree_offset; \ + while (current_level < nlevels) { /* for the following levels we have to use the previous level results */ \ + oid prev_tree_offset = tree_offset; \ levels_offset[current_level++] = tree_offset; \ for (oid pos = 0; pos < level_size; pos += SEGMENT_TREE_FANOUT) { \ oid begin = pos, end = MIN(level_size, pos + SEGMENT_TREE_FANOUT), width = end - begin; \ diff --git a/gdk/gdk_analytic_bounds.c b/gdk/gdk_analytic_bounds.c --- a/gdk/gdk_analytic_bounds.c +++ b/gdk/gdk_analytic_bounds.c @@ -199,7 +199,7 @@ GDKanalyticaldiff(BAT *r, BAT *b, BAT *p do { \ if (p) { \ for (; i < cnt; i++) { \ - if (np[i]) { \ + if (np[i]) { \ rows##TPE##IMP##CARD: \ ANALYTICAL_WINDOW_BOUNDS_ROWS##IMP(TPE, LIMIT, UPCAST); \ } \ @@ -255,7 +255,7 @@ GDKanalyticaldiff(BAT *r, BAT *b, BAT *p do { \ if (p) { \ for (; i < cnt; i++) { \ - if (np[i]) { \ + if (np[i]) { \ groups##TPE##IMP##CARD: \ ANALYTICAL_WINDOW_BOUNDS_GROUPS##IMP(TPE, LIMIT, UPCAST); \ } \ @@ -371,7 +371,7 @@ GDKanalyticaldiff(BAT *r, BAT *b, BAT *p const TPE1 *restrict bp = (TPE1*)bi.base; \ if (np) { \ for (; i < cnt; i++) { \ - if (np[i]) { \ + if (np[i]) { \ range##TPE1##TPE2##IMP##CARD: \ IMP(TPE1, LIMIT, TPE2); \ } \ @@ -515,7 +515,7 @@ GDKanalyticaldiff(BAT *r, BAT *b, BAT *p break; \ } \ rb[k] = j; \ - } \ + } \ } \ } \ } while(0) @@ -564,7 +564,7 @@ GDKanalyticaldiff(BAT *r, BAT *b, BAT *p const TPE1 *restrict bp = (TPE1*)bi.base; \ if (p) { \ for (; i < cnt; i++) { \ - if (np[i]) { \ + if (np[i]) { \ rangemtime##TPE1##TPE2##IMP##CARD: \ IMP(TPE1, LIMIT, TPE2, SUB, ADD); \ } \ @@ -689,7 +689,7 @@ GDKanalyticalallbounds(BAT *r, BAT *b, B const TPE *restrict bp = (TPE*)bi.base; \ if (p) { \ for (; i < cnt; i++) { \ - if (np[i]) { \ + if (np[i]) { \ peers##TPE##IMP: \ ANALYTICAL_WINDOW_BOUNDS_PEERS_FIXED##IMP(TPE, NAN_CHECK); \ } \ diff --git a/gdk/gdk_analytic_func.c b/gdk/gdk_analytic_func.c --- a/gdk/gdk_analytic_func.c +++ b/gdk/gdk_analytic_func.c @@ -90,7 +90,7 @@ GDKrebuild_segment_tree(oid ncount, oid TPE *rb = (TPE*)Tloc(r, 0); \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ ntile##IMP##TPE: \ NTILE_CALC(TPE, NEXT_VALUE, LNG_HGE, UPCAST, VALIDATION); \ } \ @@ -1191,7 +1191,7 @@ GDKanalyticallead(BAT *r, BAT *b, BAT *p TPE *restrict bp = (TPE*)bi.base, *rb = (TPE*)Tloc(r, 0); \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ minmaxfixed##TPE##IMP: \ ANALYTICAL_MIN_MAX_CALC_FIXED_##IMP(TPE, MIN_MAX); \ } \ @@ -1240,7 +1240,7 @@ minmaxfixed##TPE##IMP: \ default: { \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ minmaxvarsized##IMP: \ ANALYTICAL_MIN_MAX_CALC_OTHERS_##IMP(GT_LT); \ } \ @@ -1289,7 +1289,7 @@ GDKanalytical##OP(BAT *r, BAT *p, BAT *o case 5: /* all rows */ \ ANALYTICAL_MIN_MAX_BRANCHES(MIN_MAX, GT_LT, ALL_ROWS); \ break; \ - case 6: /* current row */ \ + case 6: /* current row */ \ ANALYTICAL_MIN_MAX_BRANCHES(MIN_MAX, GT_LT, CURRENT_ROW); \ break; \ default: \ @@ -1552,7 +1552,7 @@ ANALYTICAL_MIN_MAX(max, MAX, <) TPE *restrict bp = (TPE*) bheap; \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ count##TPE##IMP: \ ANALYTICAL_COUNT_FIXED_##IMP(TPE); \ } \ @@ -1601,7 +1601,7 @@ count##TPE##IMP: \ default: { \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ countothers##IMP: \ ANALYTICAL_COUNT_OTHERS_##IMP; \ } \ @@ -1817,7 +1817,7 @@ cleanup: TPE2 *rb = (TPE2*)Tloc(r, 0); \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ sum##TPE1##TPE2##IMP: \ IMP(TPE1, TPE2); \ } \ @@ -2317,7 +2317,7 @@ nosupport: TPE2 *rb = (TPE2*)Tloc(r, 0); \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ prod##TPE1##TPE2##IMP: \ IMP(TPE1, TPE2, TPE3_OR_REAL_IMP); \ } \ diff --git a/gdk/gdk_analytic_statistics.c b/gdk/gdk_analytic_statistics.c --- a/gdk/gdk_analytic_statistics.c +++ b/gdk/gdk_analytic_statistics.c @@ -306,7 +306,7 @@ avg_fp_deltas(dbl) TPE *restrict bp = (TPE*)bi.base; \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ avg##TPE##IMP: \ REAL_IMP(TPE, IMP); \ } \ @@ -578,7 +578,7 @@ avg_int_deltas(lng) TPE *restrict bp = (TPE*)bi.base, *rb = (TPE *) Tloc(r, 0); \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ avg##TPE##IMP: \ IMP(TPE); \ } \ @@ -839,7 +839,7 @@ typedef struct stdev_var_deltas { do { \ if (p) { \ while (i < cnt) { \ - if (np[i]) { \ + if (np[i]) { \ statistics##TPE##IMP: \ IMP(TPE, SAMPLE, OP); \ } \ diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c --- a/gdk/gdk_atoms.c +++ b/gdk/gdk_atoms.c @@ -1372,7 +1372,7 @@ UUIDtoString(str *retval, size_t *len, c _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org