Changeset: f68673cadf78 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f68673cadf78
Added Files:
        
sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.SQL.py
        
sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.stable.err
        
sql/test/BugTracker-2018/Tests/dependency_column_on_sequence.Bug-6618.stable.out
        
sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.py
        
sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.stable.err
        
sql/test/BugTracker-2018/Tests/local_replica_table_not_detected.Bug-6620.stable.out
        sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.py
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-rangejoin-undefined.Bug-6610.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-algebra-rangejoin-undefined.Bug-6610.stable.out
Removed Files:
        
sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.SQL.py
Modified Files:
        clients/mapiclient/mclient.c
        clients/odbc/driver/SQLGetConnectAttr.c
        clients/odbc/driver/SQLGetStmtAttr.c
        clients/odbc/driver/SQLSetStmtAttr.c
        configure.ag
        gdk/gdk_group.c
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_profiler.c
        monetdb5/modules/mal/pcre.c
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_cat.c
        sql/server/rel_schema.c
        sql/server/rel_updates.c
        sql/server/sql_mvc.c
        sql/server/sql_mvc.h
        sql/test/BugTracker-2018/Tests/All
        
sql/test/BugTracker-2018/Tests/remote-table-where-is-null.Bug-6601.stable.out
        sql/test/Tests/fsum.sql
        sql/test/Tests/fsum.stable.out
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: merge-partitions
Log Message:

Merge with default


diffs (truncated from 29705 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
@@ -302,7 +302,8 @@ timerHuman(int64_t sqloptimizer, int64_t
                fflush(stderr);
                return;
        }
-       if (timermode == T_PERF && (!total || (singleinstr != total))) {
+       if (timermode == T_PERF && (!total || singleinstr != total) &&
+           (sqloptimizer > 0 || maloptimizer > 0 || querytime > 0)) {
                /* for performance measures we use milliseconds as the base */
                fflush(stderr);
                mnstr_flush(toConsole);
diff --git a/clients/odbc/driver/SQLGetConnectAttr.c 
b/clients/odbc/driver/SQLGetConnectAttr.c
--- a/clients/odbc/driver/SQLGetConnectAttr.c
+++ b/clients/odbc/driver/SQLGetConnectAttr.c
@@ -53,9 +53,9 @@ MNDBGetConnectAttr(ODBCDbc *dbc,
                WriteData(ValuePtr, SQL_ASYNC_ENABLE_OFF, SQLULEN);
                break;
        case SQL_ATTR_AUTO_IPD:                 /* SQLUINTEGER */
-               /* TODO implement automatic filling of IPD See also
-                * SQLSetStmtAttr.c for SQL_ATTR_ENABLE_AUTO_IPD */
-               WriteData(ValuePtr, SQL_FALSE, SQLUINTEGER);
+               /* See also SQLSetStmtAttr.c for
+                * SQL_ATTR_ENABLE_AUTO_IPD */
+               WriteData(ValuePtr, SQL_TRUE, SQLUINTEGER);
                break;
        case SQL_ATTR_AUTOCOMMIT:               /* SQLUINTEGER */
                /* SQL_AUTOCOMMIT */
diff --git a/clients/odbc/driver/SQLGetStmtAttr.c 
b/clients/odbc/driver/SQLGetStmtAttr.c
--- a/clients/odbc/driver/SQLGetStmtAttr.c
+++ b/clients/odbc/driver/SQLGetStmtAttr.c
@@ -55,6 +55,9 @@ MNDBGetStmtAttr(ODBCStmt *stmt,
                /* SQL_ASYNC_ENABLE */
                WriteData(ValuePtr, SQL_ASYNC_ENABLE_OFF, SQLULEN);
                break;
+       case SQL_ATTR_ENABLE_AUTO_IPD:          /* SQLULEN */
+               WriteData(ValuePtr, SQL_TRUE, SQLULEN);
+               break;
        case SQL_ATTR_CONCURRENCY:              /* SQLULEN */
                /* SQL_CONCURRENCY */
                WriteData(ValuePtr, SQL_CONCUR_READ_ONLY, SQLULEN);
@@ -118,6 +121,10 @@ MNDBGetStmtAttr(ODBCStmt *stmt,
                return MNDBGetDescField(stmt->ImplParamDescr, 0,
                                        SQL_DESC_ARRAY_STATUS_PTR, ValuePtr,
                                        BufferLength, StringLengthPtr);
+       case SQL_ATTR_QUERY_TIMEOUT:            /* SQLULEN */
+               /* SQL_QUERY_TIMEOUT */
+               WriteData(ValuePtr, 0, SQLULEN);
+               break;
        case SQL_ATTR_RETRIEVE_DATA:            /* SQLULEN */
                /* SQL_RETRIEVE_DATA */
                WriteData(ValuePtr, stmt->retrieveData, SQLULEN);
@@ -165,12 +172,9 @@ MNDBGetStmtAttr(ODBCStmt *stmt,
 #ifdef SQL_ATTR_ASYNC_STMT_PCONTEXT
        case SQL_ATTR_ASYNC_PCONTEXT:           /* SQLPOINTER */
 #endif
-       case SQL_ATTR_ENABLE_AUTO_IPD:          /* SQLULEN */
        case SQL_ATTR_FETCH_BOOKMARK_PTR:       /* SQLLEN* */
        case SQL_ATTR_KEYSET_SIZE:              /* SQLULEN */
                /* SQL_KEYSET_SIZE */
-       case SQL_ATTR_QUERY_TIMEOUT:            /* SQLULEN */
-               /* SQL_QUERY_TIMEOUT */
        case SQL_ATTR_SIMULATE_CURSOR:          /* SQLULEN */
        case SQL_ATTR_USE_BOOKMARKS:            /* SQLULEN */
                /* Optional feature not implemented */
diff --git a/clients/odbc/driver/SQLSetStmtAttr.c 
b/clients/odbc/driver/SQLSetStmtAttr.c
--- a/clients/odbc/driver/SQLSetStmtAttr.c
+++ b/clients/odbc/driver/SQLSetStmtAttr.c
@@ -132,12 +132,30 @@ MNDBSetStmtAttr(ODBCStmt *stmt,
                        return SQL_ERROR;
                }
                break;
+       case SQL_ATTR_ENABLE_AUTO_IPD:          /* SQLULEN */
+               switch ((SQLULEN) (uintptr_t) ValuePtr) {
+               case SQL_TRUE:
+               case SQL_FALSE:
+                       break;
+               default:
+                       /* Invalid attribute value */
+                       addStmtError(stmt, "HY024", NULL, 0);
+                       return SQL_ERROR;
+               }
+               /* ignore value, always treat as SQL_TRUE */
+               break;
        case SQL_ATTR_IMP_PARAM_DESC:           /* SQLHANDLE */
        case SQL_ATTR_IMP_ROW_DESC:             /* SQLHANDLE */
                /* Invalid use of an automatically allocated
                   descriptor handle */
                addStmtError(stmt, "HY017", NULL, 0);
                return SQL_ERROR;
+       case SQL_ATTR_MAX_LENGTH:               /* SQLULEN */
+       case SQL_ATTR_MAX_ROWS:                 /* SQLULEN */
+               if ((SQLULEN) (uintptr_t) ValuePtr != 0 &&
+                   (SQLULEN) (uintptr_t) ValuePtr != 2147483647)
+                       addStmtError(stmt, "01S02", NULL, 0);
+               break;
        case SQL_ATTR_NOSCAN:                   /* SQLULEN */
                switch ((SQLULEN) (uintptr_t) ValuePtr) {
                case SQL_NOSCAN_ON:
@@ -260,11 +278,8 @@ MNDBSetStmtAttr(ODBCStmt *stmt,
        case SQL_ATTR_ASYNC_PCONTEXT:           /* SQLPOINTER */
 #endif
        case SQL_ATTR_CURSOR_SENSITIVITY:       /* SQLULEN */
-       case SQL_ATTR_ENABLE_AUTO_IPD:          /* SQLULEN */
        case SQL_ATTR_FETCH_BOOKMARK_PTR:       /* SQLLEN* */
        case SQL_ATTR_KEYSET_SIZE:              /* SQLULEN */
-       case SQL_ATTR_MAX_LENGTH:               /* SQLULEN */
-       case SQL_ATTR_MAX_ROWS:                 /* SQLULEN */
        case SQL_ATTR_QUERY_TIMEOUT:            /* SQLULEN */
        case SQL_ATTR_SIMULATE_CURSOR:          /* SQLULEN */
        case SQL_ATTR_USE_BOOKMARKS:            /* SQLULEN */
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -120,18 +120,9 @@ AC_SUBST([Qexec_prefix])
 AS_CASE([$CC],
        [*icc*-no-gcc*], [],
        [*icc*], [
-               #  Since version 8.0, ecc/ecpc are also called icc/icpc,
-               #  and icc/icpc requires "-no-gcc" to avoid predefining
-               #  __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ macros.
-               icc_ver=`$CC -dumpversion 2>/dev/null`
-               AS_CASE([$icc_ver],
-                       [8.*], [CC="$CC -no-gcc"],
-                       [9.*], [CC="$CC -no-gcc"],
-                       [10.*], [CC="$CC -no-gcc"],
-                       [11.*], [CC="$CC -no-gcc"],
-                       [15.*], [CC="$CC -no-gcc"],
-                       [17.*], [CC="$CC -no-gcc"],
-                       [AC_MSG_WARN([icc ($CC) $icc_ver not handled, yet])])])
+               #  Use "-no-gcc" to avoid predefining __GNUC__,
+               #  __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ macros.
+               CC="$CC -no-gcc"])
 
 AS_IF([test -f "$srcdir"/vertoo.data],
        [
@@ -866,8 +857,10 @@ AS_VAR_IF([enable_debug], [yes], [
        # remove "-Ox" as some compilers don't like "-g -Ox" combinations
        CFLAGS=" $CFLAGS "
        CFLAGS=`AS_ECHO(["$CFLAGS"]) | sed -e 's| -O[[0-9]] | |g' -e 's| -g | 
|g' -e 's|^ ||' -e 's| $||'`
-       # add "-g"
-       CFLAGS="$CFLAGS -g"
+       # add "-g or -g3"
+       AS_CASE([$CC_ver],
+               [gcc-*], [CFLAGS="$CFLAGS -g3"],
+               [CFLAGS="$CFLAGS -g"])
        AS_CASE([$GCC-$host_os],
                [yes-aix*], [CFLAGS="$CFLAGS -gxcoff"])
        changedCFLAGS=
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -265,9 +265,8 @@
  * The algorithm is simple.  We go through b and for each value we
  * follow the hash chain starting at the next element after that value
  * to find one that is equal to the value we're currently looking at.
- * If we found such a value (including the preexisting group if we're
- * refining), we add the value to the same group.  If we reach the end
- * of the chain, we create a new group.
+ * If we found such a value, we add the value to the same group.  If
+ * we reach the end of the chain, we create a new group.
  *
  * If b (the original, that is) is a view on another BAT, and this
  * other BAT has a hash, we use that.  The lo and hi values are the
@@ -279,96 +278,47 @@
 #define GRP_use_existing_hash_table(INIT_0,INIT_1,COMP)                        
\
        do {                                                            \
                INIT_0;                                                 \
-               if (grps) {                                             \
-                       for (r = 0; r < cnt; r++) {                     \
+               assert(grps == NULL);                                   \
+               for (r = 0; r < cnt; r++) {                             \
+                       if (cand) {                                     \
+                               p = cand[r] - hseqb + lo;               \
+                       } else {                                        \
+                               p = start + r;                          \
+                       }                                               \
+                       assert(p < end);                                \
+                       INIT_1;                                         \
+                       /* this loop is similar, but not */             \
+                       /* equal, to HASHloop: the difference */        \
+                       /* is that we only consider BUNs */             \
+                       /* smaller than the one we're looking */        \
+                       /* up (p) */                                    \
+                       for (hb = HASHgetlink(hs, p);                   \
+                            hb != HASHnil(hs) && hb >= start;          \
+                            hb = HASHgetlink(hs, hb)) {                \
+                               oid grp;                                \
+                               assert(hb < p);                         \
                                if (cand) {                             \
-                                       p = cand[r] - hseqb + lo;       \
+                                       q = r;                          \
+                                       while (q != 0 && cand[--q] > hb) \
+                                               ;                       \
+                                       if (cand[q] - hseqb != hb - lo) \
+                                               continue;               \
+                                       grp = ngrps[q];                 \
                                } else {                                \
-                                       p = start + r;                  \
+                                       grp = ngrps[hb - lo];           \
                                }                                       \
-                               assert(p < end);                        \
-                               INIT_1;                                 \
-                               /* this loop is similar, but not */     \
-                               /* equal, to HASHloop: the difference */ \
-                               /* is that we only consider BUNs */     \
-                               /* smaller than the one we're looking */ \
-                               /* up (p), and that we also consider */ \
-                               /* the input groups */                  \
-                               for (hb = HASHgetlink(hs, p);           \
-                                    hb != HASHnil(hs) && hb >= start;  \
-                                    hb = HASHgetlink(hs, hb)) {        \
-                                       oid grp;                        \
-                                       assert(hb < p);                 \
-                                       if (cand) {                     \
-                                               q = r;                  \
-                                               while (q != 0 && cand[--q] - 
hseqb > hb - lo) \
-                                                       ;               \
-                                               if (cand[q] - hseqb != hb - lo) 
\
-                                                       continue;       \
-                                               if (grps[q] != grps[r]) \
-                                                       continue;       \
-                                               grp = ngrps[q];         \
-                                       } else {                        \
-                                               if (grps[hb - lo] != grps[r]) \
-                                                       continue;       \
-                                               grp = ngrps[hb - lo];   \
-                                       }                               \
-                                       if (COMP) {                     \
-                                               ngrps[r] = grp;         \
-                                               if (histo)              \
-                                                       cnts[grp]++;    \
-                                               if (gn->tsorted &&      \
-                                                   grp != ngrp - 1)    \
-                                                       gn->tsorted = 0; \
-                                               break;                  \
-                                       }                               \
-                               }                                       \
-                               if (hb == HASHnil(hs) || hb < lo) {     \
-                                       GRPnotfound();                  \
+                               if (COMP) {                             \
+                                       ngrps[r] = grp;                 \
+                                       if (histo)                      \
+                                               cnts[grp]++;            \
+                                       if (gn->tsorted &&              \
+                                           grp != ngrp - 1)            \
+                                               gn->tsorted = 0;        \
+                                       break;                          \
                                }                                       \
                        }                                               \
-               } else {                                                \
-                       for (r = 0; r < cnt; r++) {                     \
-                               if (cand) {                             \
-                                       p = cand[r] - hseqb + lo;       \
-                               } else {                                \
-                                       p = start + r;                  \
-                               }                                       \
-                               assert(p < end);                        \
-                               INIT_1;                                 \
-                               /* this loop is similar, but not */     \
-                               /* equal, to HASHloop: the difference */ \
-                               /* is that we only consider BUNs */     \
-                               /* smaller than the one we're looking */ \
-                               /* up (p) */                            \
-                               for (hb = HASHgetlink(hs, p);           \
-                                    hb != HASHnil(hs) && hb >= start;  \
-                                    hb = HASHgetlink(hs, hb)) {        \
-                                       oid grp;                        \
-                                       assert(hb < p);                 \
-                                       if (cand) {                     \
-                                               q = r;                  \
-                                               while (q != 0 && cand[--q] > 
hb) \
-                                                       ;               \
-                                               if (cand[q] - hseqb != hb - lo) 
\
-                                                       continue;       \
-                                               grp = ngrps[q];         \
-                                       } else {                        \
-                                               grp = ngrps[hb - lo];   \
-                                       }                               \
-                                       if (COMP) {                     \
-                                               ngrps[r] = grp;         \
-                                               if (histo)              \
-                                                       cnts[grp]++;    \
-                                               if (gn->tsorted &&      \
-                                                   grp != ngrp - 1)    \
-                                                       gn->tsorted = 0; \
-                                               break;                  \
-                                       }                               \
-                               }                                       \
-                               if (hb == HASHnil(hs) || hb < lo) {     \
-                                       GRPnotfound();                  \
-                               }                                       \
+                       if (hb == HASHnil(hs) || hb < lo) {             \
+                               GRPnotfound();                          \
                        }                                               \
                }                                                       \
        } while(0)
@@ -658,9 +608,13 @@ BATgroup_internal(BAT **groups, BAT **ex
                        prop = BATgetprop(g, GDK_MAX_VALUE);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to