Changeset: cd76f6265166 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd76f6265166
Added Files:
sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql
sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql
Modified Files:
clients/mapiclient/Makefile.ag
clients/mapilib/Makefile.ag
common/utils/mcrypt.h
monetdb5/extras/mal_optimizer_template/Makefile.ag
monetdb5/tools/Makefile.ag
sql/backends/monet5/Makefile.ag
sql/test/BugTracker-2018/Tests/All
Branch: default
Log Message:
Merge with Mar2018 branch.
diffs (155 lines):
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/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/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 \
diff --git a/sql/test/BugTracker-2018/Tests/All
b/sql/test/BugTracker-2018/Tests/All
--- a/sql/test/BugTracker-2018/Tests/All
+++ b/sql/test/BugTracker-2018/Tests/All
@@ -40,3 +40,5 @@ sqlitelogictest-having-not-null-not-in.B
sqlitelogictest-groupby-having-in.Bug-6560
sqlitelogictest-groupby-having-in-cast.Bug-6561
sqlitelogictest-groupby-having-not-null-not-in.Bug-6562
+sqlitelogictest-complex-case-nullif-coalesce.Bug-6565
+sqlitelogictest-mal-calc-undefined.Bug-6566
diff --git
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql
new file mode 100644
--- /dev/null
+++
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-nullif-coalesce.Bug-6565.sql
@@ -0,0 +1,3 @@
+SELECT + NULLIF ( + 67, + + NULLIF ( + + 46, 66 - CASE WHEN 51 IN ( + 91 )
THEN + SUM ( CAST ( NULL AS INTEGER ) )
++ - 92 ELSE - ( - 47 ) END ) ) / - CAST ( NULL AS INTEGER ) + + NULLIF ( -
COALESCE ( CAST ( - 35 AS INTEGER ), + 6,
+COUNT ( ALL 28 ) ), 75 + 14 );
diff --git
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql
new file mode 100644
--- /dev/null
+++
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-mal-calc-undefined.Bug-6566.sql
@@ -0,0 +1,5 @@
+CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab0 VALUES(97,1,99), (15,81,47), (87,21,10);
+SELECT - col0 - - - col0 * + CAST ( NULL AS INTEGER ) FROM tab0;
+SELECT ALL - col1 * - 16 * + CAST ( NULL AS INTEGER ) FROM tab0 cor0;
+DROP TABLE tab0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list