Changeset: b8bf1d8f9486 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b8bf1d8f9486
Added Files:
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.stable.out
        sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.stable.out
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-not-between-wrong.Bug-6569.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-undefined-calc.Bug-6570.sql
Modified Files:
        clients/Tests/exports.stable.out
        clients/mapiclient/Makefile.ag
        clients/mapilib/Makefile.ag
        common/utils/mcrypt.h
        common/utils/muuid.h
        gdk/gdk_cross.c
        gdk/gdk_group.c
        monetdb5/extras/mal_optimizer_template/Makefile.ag
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_profiler.c
        monetdb5/tools/Makefile.ag
        sql/backends/monet5/Makefile.ag
        sql/server/rel_optimizer.c
        sql/server/rel_select.c
        sql/test/BugTracker-2015/Tests/null.Bug-3833.stable.out
        sql/test/BugTracker-2016/Tests/null_in_null.Bug-3900.stable.out
        sql/test/BugTracker-2018/Tests/All
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-wrong-cast-null.Bug-6551.stable.out
        testing/listexports.py.in
        tools/merovingian/ChangeLog
        tools/merovingian/daemon/controlrunner.c
        tools/merovingian/daemon/forkmserver.c
Branch: delete_in_vlist
Log Message:

Merge with default.


diffs (truncated from 826 to 300 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -435,23 +435,6 @@ char *mo_find_option(opt *set, int setle
 void mo_free_options(opt *set, int setlen);
 void mo_print_options(opt *set, int setlen);
 int mo_system_config(opt **Set, int setlen);
-void msab_dbfarminit(const char *dbfarm);
-void msab_dbpathinit(const char *dbpath);
-char *msab_deserialise(sabdb **ret, char *sabdb);
-char *msab_freeStatus(sabdb **ret);
-char *msab_getDBfarm(char **ret);
-char *msab_getDBname(char **ret);
-char *msab_getMyStatus(sabdb **ret);
-char *msab_getStatus(sabdb **ret, char *dbname);
-char *msab_getUplogInfo(sabuplog *ret, const sabdb *db);
-char *msab_marchConnection(const char *host, const int port);
-char *msab_marchScenario(const char *lang);
-char *msab_registerStarted(void);
-char *msab_registerStarting(void);
-char *msab_registerStop(void);
-char *msab_retreatScenario(const char *lang);
-char *msab_serialise(char **ret, const sabdb *db);
-char *msab_wildRetreat(void);
 const oid oid_nil;
 DIR *opendir(const char *dirname);
 void print_trace(void);
@@ -585,6 +568,22 @@ MapiMsg mapi_timeout(Mapi mid, unsigned 
 void mapi_trace(Mapi mid, int flag);
 char *mapi_unquote(char *msg);
 MapiMsg mapi_virtual_result(MapiHdl hdl, int columns, const char 
**columnnames, const char **columntypes, const int *columnlengths, int 
tuplecount, const char ***tuples);
+char *mcrypt_BackendSum(const char *string, size_t len);
+char *mcrypt_MD5Sum(const char *string, size_t len);
+char *mcrypt_RIPEMD160Sum(const char *string, size_t len);
+char *mcrypt_SHA1Sum(const char *string, size_t len);
+char *mcrypt_SHA224Sum(const char *string, size_t len);
+char *mcrypt_SHA256Sum(const char *string, size_t len);
+char *mcrypt_SHA384Sum(const char *string, size_t len);
+char *mcrypt_SHA512Sum(const char *string, size_t len);
+const char *mcrypt_getHashAlgorithms(void);
+char *mcrypt_hashPassword(const char *algo, const char *password, const char 
*challenge);
+int mo_add_option(opt **Set, int setlen, opt_kind kind, const char *name, 
const char *value);
+int mo_builtin_settings(opt **Set);
+char *mo_find_option(opt *set, int setlen, const char *name);
+void mo_free_options(opt *set, int setlen);
+void mo_print_options(opt *set, int setlen);
+int mo_system_config(opt **Set, int setlen);
 const char *wsaerror(int);
 
 # monetdb5
@@ -2357,6 +2356,23 @@ char monet_characteristics[4096];
 char monet_cwd[FILENAME_MAX];
 size_t monet_memory;
 void moveInstruction(MalBlkPtr mb, int pc, int target);
+void msab_dbfarminit(const char *dbfarm);
+void msab_dbpathinit(const char *dbpath);
+char *msab_deserialise(sabdb **ret, char *sabdb);
+char *msab_freeStatus(sabdb **ret);
+char *msab_getDBfarm(char **ret);
+char *msab_getDBname(char **ret);
+char *msab_getMyStatus(sabdb **ret);
+char *msab_getStatus(sabdb **ret, char *dbname);
+char *msab_getUplogInfo(sabuplog *ret, const sabdb *db);
+char *msab_marchConnection(const char *host, const int port);
+char *msab_marchScenario(const char *lang);
+char *msab_registerStarted(void);
+char *msab_registerStarting(void);
+char *msab_registerStop(void);
+char *msab_retreatScenario(const char *lang);
+char *msab_serialise(char **ret, const sabdb *db);
+char *msab_wildRetreat(void);
 void mserver_reset(int exit);
 str mtimeRef;
 str mulRef;
diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -35,7 +35,7 @@ bin_stethoscope = {
        LIBS = libmcutil ../../common/utils/libmutils \
                ../mapilib/libmapi \
                ../../common/stream/libstream \
-               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS) 
$(PTHREAD_LIBS)
+               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
 bin_tachograph = {
@@ -43,7 +43,7 @@ bin_tachograph = {
        LIBS = libmcutil ../../common/utils/libmutils \
                ../mapilib/libmapi \
                ../../common/stream/libstream \
-               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS) 
$(PTHREAD_LIBS)
+               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
 bin_tomograph = {
@@ -51,7 +51,7 @@ bin_tomograph = {
        LIBS = libmcutil ../../common/utils/libmutils \
                ../mapilib/libmapi \
                ../../common/stream/libstream \
-               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS) 
$(PTHREAD_LIBS)
+               $(SOCKET_LIBS) $(zlib_LIBS) $(BZ_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
 # disabled: it's not really a tool for users, more to debug mapi
diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag
--- a/clients/mapilib/Makefile.ag
+++ b/clients/mapilib/Makefile.ag
@@ -7,7 +7,7 @@
 MTSAFE
 
 INCLUDES = ../../common/options ../../common/stream ../../common/utils \
-                  $(MSGCONTROL_FLAGS)
+                  $(MSGCONTROL_FLAGS) $(openssl_CFLAGS)
 
 lib_mapi = {
        VERSION = $(MAPI_VERSION)
diff --git a/common/utils/mcrypt.h b/common/utils/mcrypt.h
--- a/common/utils/mcrypt.h
+++ b/common/utils/mcrypt.h
@@ -9,14 +9,25 @@
 #ifndef _SEEN_MCRYPT_H
 #define _SEEN_MCRYPT_H 1
 
-const char *mcrypt_getHashAlgorithms(void);
-char *mcrypt_MD5Sum(const char *string, size_t len);
-char *mcrypt_SHA1Sum(const char *string, size_t len);
-char *mcrypt_SHA224Sum(const char *string, size_t len);
-char *mcrypt_SHA256Sum(const char *string, size_t len);
-char *mcrypt_SHA384Sum(const char *string, size_t len);
-char *mcrypt_SHA512Sum(const char *string, size_t len);
-char *mcrypt_RIPEMD160Sum(const char *string, size_t len);
-char *mcrypt_BackendSum(const char *string, size_t len);
-char *mcrypt_hashPassword(const char *algo, const char *password, const char 
*challenge);
+#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+#if !defined(LIBMAPI) && !defined(LIBMCRYPT)
+#define mcrypt_export extern __declspec(dllimport)
+#else
+#define mcrypt_export extern __declspec(dllexport)
+#endif
+#else
+#define mcrypt_export extern
 #endif
+
+mcrypt_export const char *mcrypt_getHashAlgorithms(void);
+mcrypt_export char *mcrypt_MD5Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_SHA1Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_SHA224Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_SHA256Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_SHA384Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_SHA512Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_RIPEMD160Sum(const char *string, size_t len);
+mcrypt_export char *mcrypt_BackendSum(const char *string, size_t len);
+mcrypt_export char *mcrypt_hashPassword(const char *algo, const char 
*password, const char *challenge);
+#endif
+
diff --git a/common/utils/muuid.h b/common/utils/muuid.h
--- a/common/utils/muuid.h
+++ b/common/utils/muuid.h
@@ -14,11 +14,13 @@
  * exported so that the call in sql can be satisfied by the version
  * that is included in monetdb5 */
 extern
-#if defined(WIN32) && !defined(LIBMSABAOTH) && !defined(LIBMUUID)
+#ifdef WIN32
+#if !defined(LIBMSABAOTH) && !defined(LIBMUUID)
 __declspec(dllimport)
 #else
 __declspec(dllexport)
 #endif
+#endif
 char *generateUUID(void);
 
 #endif
diff --git a/gdk/gdk_cross.c b/gdk/gdk_cross.c
--- a/gdk/gdk_cross.c
+++ b/gdk/gdk_cross.c
@@ -36,8 +36,13 @@ BATsubcross(BAT **r1p, BAT **r2p, BAT *l
                cnt2 = rcandend - rcand;
 
        bn1 = COLnew(0, TYPE_oid, cnt1 * cnt2, TRANSIENT);
-       if (bn1 == NULL)
+       bn2 = COLnew(0, TYPE_oid, cnt1 * cnt2, TRANSIENT);
+       if (bn1 == NULL || bn2 == NULL) {
+               BBPreclaim(bn1);
+               BBPreclaim(bn2);
                return GDK_FAIL;
+       }
+
        BATsetcount(bn1, cnt1 * cnt2);
        bn1->tsorted = 1;
        bn1->trevsorted = cnt1 <= 1;
@@ -58,13 +63,8 @@ BATsubcross(BAT **r1p, BAT **r2p, BAT *l
                BATtseqbase(bn1, bn1->tkey ? seq : oid_nil);
        }
 
-       bn2 = COLnew(0, TYPE_oid, cnt1 * cnt2, TRANSIENT);
-       if (bn2 == NULL) {
-               BBPreclaim(bn1);
-               return GDK_FAIL;
-       }
        BATsetcount(bn2, cnt1 * cnt2);
-       bn2->tsorted = cnt1 <= 1;
+       bn2->tsorted = cnt1 <= 1 || cnt2 <= 1;
        bn2->trevsorted = cnt2 <= 1;
        bn2->tkey = cnt1 <= 1;
        bn2->tnil = 0;
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -633,7 +633,7 @@ BATgroup_internal(BAT **groups, BAT **ex
                                en->tnonil = 1;
                                en->tseqbase = oid_nil;
                        } else {
-                               en = BATdense(0, b->hseqbase, cnt);
+                               en = BATdense(0, b->hseqbase + start, cnt);
                                if (en == NULL)
                                        goto error;
                        }
diff --git a/monetdb5/extras/mal_optimizer_template/Makefile.ag 
b/monetdb5/extras/mal_optimizer_template/Makefile.ag
--- a/monetdb5/extras/mal_optimizer_template/Makefile.ag
+++ b/monetdb5/extras/mal_optimizer_template/Makefile.ag
@@ -18,10 +18,8 @@ lib_opt_sql_append = {
        DIR = libdir/monetdb5
        SEP = _
        SOURCES = opt_sql_append.c opt_sql_append.h
-       LIBS = NATIVE_WIN32?../../tools/libmonetdb5 \
-               NATIVE_WIN32?../../../gdk/libbat \
-               NATIVE_WIN32?../../../common/stream/libstream \
-               $(MALLOC_LIBS)
+       LIBS = WIN32?../../tools/libmonetdb5 \
+               WIN32?../../../gdk/libbat
 }
 
 headers_mal = {
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -655,8 +655,7 @@ str runMALsequence(Client cntxt, MalBlkP
                                                BAT *_b = BATdescriptor(bid);
                                                t = getBatType(t);
                                                assert(stk->stk[a].vtype == 
TYPE_bat);
-                                               assert(bid == 0 ||
-                                                          is_bat_nil(bid) ||
+                                               assert(is_bat_nil(bid) ||
                                                           t == TYPE_any ||
                                                           ATOMtype(_b->ttype) 
== ATOMtype(t));
                                                if(_b) BBPunfix(bid);
@@ -680,8 +679,7 @@ str runMALsequence(Client cntxt, MalBlkP
                                        bat bid = stk->stk[a].val.bval;
                                        t = getBatType(t);
                                        assert(stk->stk[a].vtype == TYPE_bat);
-                                       assert(bid == 0 ||
-                                                  is_bat_nil(bid) ||
+                                       assert(is_bat_nil(bid) ||
                                                   t == TYPE_any ||
                                                   
ATOMtype(BBP_desc(bid)->ttype) == ATOMtype(t));
                                } else {
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -162,6 +162,8 @@ renderProfilerEvent(MalBlkPtr mb, MalStk
        logadd("\"function\":\"%s.%s\",%s", getModuleId(getInstrPtr(mb, 0)), 
getFunctionId(getInstrPtr(mb, 0)), prettify);
        logadd("\"pc\":%d,%s", mb?getPC(mb,pci):0, prettify);
        logadd("\"tag\":%d,%s", stk?stk->tag:0, prettify);
+       logadd("\"module\":\"%s\",%s", pci->modname ? pci->modname : "", 
prettify);
+       logadd("\"instruction\":\"%s\",%s", pci->fcnname ? pci->fcnname : "", 
prettify);
        if( mal_session_uuid)
                logadd("\"session\":\"%s\",%s",mal_session_uuid,prettify);
 
diff --git a/monetdb5/tools/Makefile.ag b/monetdb5/tools/Makefile.ag
--- a/monetdb5/tools/Makefile.ag
+++ b/monetdb5/tools/Makefile.ag
@@ -17,9 +17,8 @@ lib_monetdb5 = {
        LIBS = ../mal/libmal ../modules/atoms/libatoms \
                ../modules/kernel/libkernel ../modules/mal/libmal \
                ../optimizer/liboptimizer ../scheduler/libscheduler \
-               ../../common/utils/libmcrypt \
+               ../../common/utils/libmsabaoth \
                ../../common/utils/libmuuid \
-               ../../common/utils/libmsabaoth \
                WIN32?../../gdk/libbat \
                WIN32&HAVE_MAPI?../../clients/mapilib/libmapi \
                WIN32?../../common/stream/libstream \
diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag
--- a/sql/backends/monet5/Makefile.ag
+++ b/sql/backends/monet5/Makefile.ag
@@ -47,11 +47,12 @@ lib__sql = {
                sql_orderidx.c sql_orderidx.h \
                wlr.c wlr.h \
                sql_rank.c sql_rank.h
+       # libmapi on Windows for mcrypt_*
        LIBS = ../../server/libsqlserver \
                ../../storage/libstore \
                ../../storage/bat/libbatstore \
                ../../common/libsqlcommon \
-               WIN32?../../../common/utils/libmcrypt \
+               WIN32?../../../clients/mapilib/libmapi \
                WIN32?../../../monetdb5/tools/libmonetdb5 \
                WIN32?../../../gdk/libbat \
                WIN32?../../../common/stream/libstream \
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to