Changeset: 3cf104081410 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3cf104081410
Modified Files:
        clients/mapiclient/mhelp.c
        sql/scripts/51_sys_schema_extension.sql
        sql/server/rel_updates.c
        sql/storage/bat/bat_storage.c
        sql/storage/store.c
Branch: copybinary
Log Message:

Merge tag 'predefault' into branches/copybinary


diffs (truncated from 4739 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -786,11 +786,6 @@ fi
 %setup -q
 
 %build
-%if (0%{?fedora} >= 33)
-# on Fedora 33 we get a crash of the compiler when using -flto, so disable it
-CFLAGS="${CFLAGS:-%optflags} -fno-lto"
-export CFLAGS
-%endif
 %cmake3 \
        -DRELEASE_VERSION=ON \
        -DASSERT=OFF \
diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -6638,6 +6638,7 @@ stdout of test 'MAL-signatures` in direc
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:str, 
X_2:bat[:int], X_3:bat[:oid]):bat[:int] ",   "STRbatWChrAt_strcst;", ""      ]
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:bat[:str], 
X_2:int):bat[:int] ",  "STRbatWChrAtcst;",     ""      ]
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:bat[:str], 
X_2:int, X_3:bat[:oid]):bat[:int] ",   "STRbatWChrAtcst;",     ""      ]
+[ "battxtsim", "similarity",   "command battxtsim.similarity(X_1:bat[:str], 
X_2:bat[:str]):bat[:dbl] ",        "fstrcmp0_impl_bulk;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:bte], 
X_2:bat[:bte]):bat[:sht] ", "UDFBATfuse;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:int], 
X_2:bat[:int]):bat[:lng] ", "UDFBATfuse;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:sht], 
X_2:bat[:sht]):bat[:int] ", "UDFBATfuse;",  ""      ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -9197,6 +9197,7 @@ stdout of test 'MAL-signatures` in direc
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:str, 
X_2:bat[:int], X_3:bat[:oid]):bat[:int] ",   "STRbatWChrAt_strcst;", ""      ]
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:bat[:str], 
X_2:int):bat[:int] ",  "STRbatWChrAtcst;",     ""      ]
 [ "batstr",    "unicodeAt",    "pattern batstr.unicodeAt(X_1:bat[:str], 
X_2:int, X_3:bat[:oid]):bat[:int] ",   "STRbatWChrAtcst;",     ""      ]
+[ "battxtsim", "similarity",   "command battxtsim.similarity(X_1:bat[:str], 
X_2:bat[:str]):bat[:dbl] ",        "fstrcmp0_impl_bulk;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:bte], 
X_2:bat[:bte]):bat[:sht] ", "UDFBATfuse;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:int], 
X_2:bat[:int]):bat[:lng] ", "UDFBATfuse;",  ""      ]
 [ "batudf",    "fuse", "command batudf.fuse(X_1:bat[:lng], 
X_2:bat[:lng]):bat[:hge] ", "UDFBATfuse;",  ""      ]
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -217,7 +217,7 @@ SQLhelp sqlhelp1[] = {
         "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Tables"},
        {"CREATE TRIGGER",
         "Define a triggered action for a table data update event",
-        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER }\n"
+        "CREATE [ OR REPLACE ] TRIGGER ident { BEFORE | AFTER }\n"
         " { INSERT | DELETE | TRUNCATE | UPDATE [ OF ident_list ] }\n"
         " ON qname [ REFERENCING trigger_reference [...] ] triggered_action",
         "qname,ident_list,trigger_reference,triggered_action",
diff --git a/clients/mapilib/.editorconfig b/clients/mapilib/.editorconfig
new file mode 100644
--- /dev/null
+++ b/clients/mapilib/.editorconfig
@@ -0,0 +1,3 @@
+[*.{c,h}]
+tab_width = 8
+max_line_length = 72
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -1524,8 +1524,7 @@ close_result(MapiHdl hdl)
                       (hdl->npending_close > 0 && hdl->pending_close != NULL));
                if (mid->active &&
                    (mid->active->active != result ||
-                    result->cache.tuplecount < result->row_count))
-               {
+                    result->cache.tuplecount < result->row_count)) {
                        /* results for which we got all tuples at the initial
                         * response, need not to be closed as the server already
                         * did that immediately */
@@ -1689,9 +1688,9 @@ mapi_next_result(MapiHdl hdl)
                        return MERROR;
                if (hdl->result &&
                    (hdl->result->querytype == -1 ||
-                        /* basically exclude Q_PARSE and Q_BLOCK */
-                        (hdl->result->querytype >= Q_TABLE &&
-                         hdl->result->querytype <= Q_PREPARE) ||
+                    /* basically exclude Q_PARSE and Q_BLOCK */
+                    (hdl->result->querytype >= Q_TABLE &&
+                     hdl->result->querytype <= Q_PREPARE) ||
                     hdl->result->errorstr != NULL))
                        return 1;
        }
@@ -1727,9 +1726,9 @@ mapi_more_results(MapiHdl hdl)
        while (result->next) {
                result = result->next;
                if (result->querytype == -1 ||
-                       /* basically exclude Q_PARSE and Q_BLOCK */
-                       (hdl->result->querytype >= Q_TABLE &&
-                        hdl->result->querytype <= Q_PREPARE) ||
+                   /* basically exclude Q_PARSE and Q_BLOCK */
+                   (hdl->result->querytype >= Q_TABLE &&
+                    hdl->result->querytype <= Q_PREPARE) ||
                    result->errorstr != NULL)
                        return true;
        }
@@ -2286,7 +2285,7 @@ mapi_reconnect(Mapi mid)
                                        /* see comment above for why
                                         * we don't stat */
                                        snprintf(buf, sizeof(buf),
-                                                        "%s/.s.monetdb.%d", 
host, MAPI_PORT);
+                                                "%s/.s.monetdb.%d", host, 
MAPI_PORT);
                                        host = buf;
                                }
 #endif
@@ -2479,12 +2478,12 @@ mapi_reconnect(Mapi mid)
                                closesocket(s);
                        }
                        snprintf(errbuf, sizeof(errbuf),
-                                        "could not connect to %s:%s: %s",
-                                        mid->hostname, port,
+                                "could not connect to %s:%s: %s",
+                                mid->hostname, port,
 #ifdef _MSC_VER
-                                        wsaerror(WSAGetLastError())
+                                wsaerror(WSAGetLastError())
 #else
-                                        strerror(errno)
+                                strerror(errno)
 #endif
                                );
                }
@@ -2510,15 +2509,15 @@ mapi_reconnect(Mapi mid)
                praddrlen = (socklen_t) sizeof(praddr.ss);
                if (getsockname(s, (struct sockaddr *) &myaddr.ss, &myaddrlen) 
== 0 &&
                    getpeername(s, (struct sockaddr *) &praddr.ss, &praddrlen) 
== 0 &&
-                       myaddr.ss.ss_family == praddr.ss.ss_family &&
-                       (myaddr.ss.ss_family == AF_INET
-                        ? myaddr.i4.sin_port == praddr.i4.sin_port
-                        : myaddr.i6.sin6_port == praddr.i6.sin6_port) &&
-                       (myaddr.ss.ss_family == AF_INET
-                        ? myaddr.i4.sin_addr.s_addr == 
praddr.i4.sin_addr.s_addr
-                        : memcmp(myaddr.i6.sin6_addr.s6_addr,
-                                         praddr.i6.sin6_addr.s6_addr,
-                                         sizeof(praddr.i6.sin6_addr.s6_addr)) 
== 0)) {
+                   myaddr.ss.ss_family == praddr.ss.ss_family &&
+                   (myaddr.ss.ss_family == AF_INET
+                    ? myaddr.i4.sin_port == praddr.i4.sin_port
+                    : myaddr.i6.sin6_port == praddr.i6.sin6_port) &&
+                   (myaddr.ss.ss_family == AF_INET
+                    ? myaddr.i4.sin_addr.s_addr == praddr.i4.sin_addr.s_addr
+                    : memcmp(myaddr.i6.sin6_addr.s6_addr,
+                             praddr.i6.sin6_addr.s6_addr,
+                             sizeof(praddr.i6.sin6_addr.s6_addr)) == 0)) {
                        closesocket(s);
                        return mapi_setError(mid, "connected to self",
                                             __func__, MERROR);
@@ -2611,7 +2610,7 @@ mapi_reconnect(Mapi mid)
 
                if (mid->username == NULL || mid->password == NULL) {
                        mapi_setError(mid, "username and password must be set",
-                                       __func__, MERROR);
+                                     __func__, MERROR);
                        close_connection(mid);
                        return mid->error;
                }
@@ -2622,7 +2621,7 @@ mapi_reconnect(Mapi mid)
                if (rest == NULL) {
                        /* protocol violation, not enough fields */
                        mapi_setError(mid, "Not enough fields in challenge 
string",
-                                       __func__, MERROR);
+                                     __func__, MERROR);
                        close_connection(mid);
                        return mid->error;
                }
@@ -2658,43 +2657,43 @@ mapi_reconnect(Mapi mid)
 #ifdef HAVE_RIPEMD160_UPDATE
                        if (strcmp(serverhash, "RIPEMD160") == 0) {
                                pwdhash = mcrypt_RIPEMD160Sum(mid->password,
-                                               strlen(mid->password));
+                                                             
strlen(mid->password));
                        } else
 #endif
 #ifdef HAVE_SHA512_UPDATE
                        if (strcmp(serverhash, "SHA512") == 0) {
                                pwdhash = mcrypt_SHA512Sum(mid->password,
-                                               strlen(mid->password));
+                                                          
strlen(mid->password));
                        } else
 #endif
 #ifdef HAVE_SHA384_UPDATE
                        if (strcmp(serverhash, "SHA384") == 0) {
                                pwdhash = mcrypt_SHA384Sum(mid->password,
-                                               strlen(mid->password));
+                                                          
strlen(mid->password));
                        } else
 #endif
 #ifdef HAVE_SHA256_UPDATE
                        if (strcmp(serverhash, "SHA256") == 0) {
                                pwdhash = mcrypt_SHA256Sum(mid->password,
-                                               strlen(mid->password));
+                                                          
strlen(mid->password));
                        } else
 #endif
 #ifdef HAVE_SHA224_UPDATE
                        if (strcmp(serverhash, "SHA224") == 0) {
                                pwdhash = mcrypt_SHA224Sum(mid->password,
-                                               strlen(mid->password));
+                                                          
strlen(mid->password));
                        } else
 #endif
 #ifdef HAVE_SHA1_UPDATE
                        if (strcmp(serverhash, "SHA1") == 0) {
                                pwdhash = mcrypt_SHA1Sum(mid->password,
-                                               strlen(mid->password));
+                                                        strlen(mid->password));
                        } else
 #endif
                        {
                                (void)pwdhash;
                                snprintf(buf, sizeof(buf), "server requires 
unknown hash '%.100s'",
-                                               serverhash);
+                                        serverhash);
                                close_connection(mid);
                                return mapi_setError(mid, buf, __func__, 
MERROR);
                        }
@@ -2702,7 +2701,7 @@ mapi_reconnect(Mapi mid)
 #if defined(HAVE_RIPEMD160_UPDATE) || defined(HAVE_SHA512_UPDATE) || 
defined(HAVE_SHA384_UPDATE) || defined(HAVE_SHA256_UPDATE) || 
defined(HAVE_SHA224_UPDATE) || defined(HAVE_SHA1_UPDATE)
                        if (pwdhash == NULL) {
                                snprintf(buf, sizeof(buf), "allocation failure 
or unknown hash '%.100s'",
-                                               serverhash);
+                                        serverhash);
                                close_connection(mid);
                                return mapi_setError(mid, buf, __func__, 
MERROR);
                        }
@@ -3196,7 +3195,7 @@ MapiMsg
 mapi_bind_numeric(MapiHdl hdl, int fnr, int scale, int prec, void *ptr)
 {
        if (mapi_bind_var(hdl, fnr, MAPI_NUMERIC, ptr))
-                return hdl->mid->error;
+               return hdl->mid->error;
 
        hdl->bindings[fnr].scale = scale;
        hdl->bindings[fnr].precision = prec;
@@ -3253,7 +3252,7 @@ MapiMsg
 mapi_param_numeric(MapiHdl hdl, int fnr, int scale, int prec, void *ptr)
 {
        if (mapi_param_type(hdl, fnr, MAPI_NUMERIC, MAPI_NUMERIC, ptr))
-                return hdl->mid->error;
+               return hdl->mid->error;
 
        hdl->params[fnr].scale = scale;
        hdl->params[fnr].precision = prec;
@@ -3373,7 +3372,6 @@ mapi_prepare(Mapi mid, const char *cmd)
                                free(q);                        \
                                return;                         \
                        }                                       \
-                       hdl->query = q;                         \
                }                                               \
        } while (0)
 
@@ -3476,30 +3474,30 @@ mapi_param_store(MapiHdl hdl)
                        case MAPI_DATE:
                                checkSpace(50);
                                snprintf(hdl->query + k, lim - k,
-                                       "DATE '%04hd-%02hu-%02hu'",
-                                       ((MapiDate *) src)->year,
-                                       ((MapiDate *) src)->month,
-                                       ((MapiDate *) src)->day);
+                                        "DATE '%04hd-%02hu-%02hu'",
+                                        ((MapiDate *) src)->year,
+                                        ((MapiDate *) src)->month,
+                                        ((MapiDate *) src)->day);
                                break;
                        case MAPI_TIME:
                                checkSpace(60);
                                snprintf(hdl->query + k, lim - k,
-                                       "TIME '%02hu:%02hu:%02hu'",
-                                       ((MapiTime *) src)->hour,
-                                       ((MapiTime *) src)->minute,
-                                       ((MapiTime *) src)->second);
+                                        "TIME '%02hu:%02hu:%02hu'",
+                                        ((MapiTime *) src)->hour,
+                                        ((MapiTime *) src)->minute,
+                                        ((MapiTime *) src)->second);
                                break;
                        case MAPI_DATETIME:
                                checkSpace(110);
                                snprintf(hdl->query + k, lim - k,
-                                       "TIMESTAMP '%04hd-%02hu-%02hu 
%02hu:%02hu:%02hu.%09u'",
-                                       ((MapiDateTime *) src)->year,
-                                       ((MapiDateTime *) src)->month,
-                                       ((MapiDateTime *) src)->day,
-                                       ((MapiDateTime *) src)->hour,
-                                       ((MapiDateTime *) src)->minute,
-                                       ((MapiDateTime *) src)->second,
-                                       ((MapiDateTime *) src)->fraction);
+                                        "TIMESTAMP '%04hd-%02hu-%02hu 
%02hu:%02hu:%02hu.%09u'",
+                                        ((MapiDateTime *) src)->year,
+                                        ((MapiDateTime *) src)->month,
+                                        ((MapiDateTime *) src)->day,
+                                        ((MapiDateTime *) src)->hour,
+                                        ((MapiDateTime *) src)->minute,
+                                        ((MapiDateTime *) src)->second,
+                                        ((MapiDateTime *) src)->fraction);
                                break;
                        case MAPI_CHAR:
                                buf[0] = *(char *) src;
@@ -3835,7 +3833,7 @@ mapi_extend_cache(struct MapiResultSet *
        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to