Changeset: 1262f3e47412 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1262f3e47412
Added Files:
        sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.sql
        
sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.err
        
sql/test/BugTracker-2016/Tests/convert-function-test-hge.Bug-3460.stable.out
        sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.sql
        sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err
        
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err.int128
        sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out
        
sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.out.int128
        sql/test/malloc_fail/Tests/All
        sql/test/malloc_fail/Tests/setmemorylimit.sql
        sql/test/malloc_fail/Tests/setmemorylimit.stable.err
        sql/test/malloc_fail/Tests/setmemorylimit.stable.out
Removed Files:
        monetdb5/mal/Tests/recycle00.malC
        monetdb5/mal/Tests/recycle00.stable.err
        monetdb5/mal/Tests/recycle00.stable.out
        monetdb5/mal/Tests/recycle01.malC
        monetdb5/mal/Tests/recycle01.stable.err
        monetdb5/mal/Tests/recycle01.stable.out
        monetdb5/mal/Tests/recycle02.malC
        monetdb5/mal/Tests/recycle02.stable.err
        monetdb5/mal/Tests/recycle02.stable.out
        monetdb5/mal/Tests/recycle03.malC
        monetdb5/mal/Tests/recycle03.stable.err
        monetdb5/mal/Tests/recycle03.stable.out
        monetdb5/mal/Tests/recycle04.malC
        monetdb5/mal/Tests/recycle04.stable.err
        monetdb5/mal/Tests/recycle04.stable.out
        monetdb5/mal/Tests/recycle05.malC
        monetdb5/mal/Tests/recycle05.stable.err
        monetdb5/mal/Tests/recycle05.stable.out
        monetdb5/mal/Tests/recycle07.malC
        monetdb5/mal/Tests/recycle07.stable.err
        monetdb5/mal/Tests/recycle07.stable.out
        monetdb5/mal/Tests/recycle08.malC
        monetdb5/mal/Tests/recycle08.stable.err
        monetdb5/mal/Tests/recycle08.stable.out
        monetdb5/mal/Tests/recycle10.malC
        monetdb5/mal/Tests/recycle10.stable.err
        monetdb5/mal/Tests/recycle10.stable.out
        monetdb5/mal/Tests/recycle11.malC
        monetdb5/mal/Tests/recycle11.stable.err
        monetdb5/mal/Tests/recycle11.stable.out
        monetdb5/mal/Tests/recycle12.malC
        monetdb5/mal/Tests/recycle12.stable.err
        monetdb5/mal/Tests/recycle12.stable.out
        monetdb5/mal/mal_recycle.c
        monetdb5/mal/mal_recycle.h
        monetdb5/modules/mal/recycle.c
        monetdb5/modules/mal/recycle.h
        monetdb5/modules/mal/recycle.mal
        monetdb5/optimizer/opt_recycler.c
        monetdb5/optimizer/opt_recycler.h
        sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.sql
        sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.err
        sql/test/BugTracker-2009/Tests/table-leftovers.SF-2779462.stable.out
        
sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.err.oid32
        
sql/test/BugTracker-2010/Tests/offset_limited_32bit.SF-2950579.stable.out.oid32
        sql/test/pg_regress/Tests/oid.stable.err.64bit.oid32
        sql/test/pg_regress/Tests/oid.stable.err.Windows.oid32
        sql/test/pg_regress/Tests/oid.stable.err.oid32.int128
        sql/test/pg_regress/Tests/oid.stable.out.oid32
        sql/test/pg_regress/Tests/without_oid.stable.out.oid32
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.oid32
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.oid32
Modified Files:
        MonetDB.spec
        NT/monetdb_config.h.in
        NT/rules.msc
        buildtools/ChangeLog
        clients/Tests/All
        clients/Tests/exports.stable.out
        configure.ag
        gdk/gdk.h
        gdk/gdk_utils.c
        gdk/gdk_utils.h
        java/tests/Test_CisValid.java
        monetdb5/mal/Makefile.ag
        monetdb5/mal/Tests/All
        monetdb5/mal/mal.c
        monetdb5/mal/mal.h
        monetdb5/mal/mal_exception.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_instruction.h
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_interpreter.h
        monetdb5/mal/mal_runtime.c
        monetdb5/modules/mal/Makefile.ag
        monetdb5/modules/mal/mal_init.mal
        monetdb5/modules/mal/mal_io.c
        monetdb5/modules/mal/mal_io.h
        monetdb5/modules/mal/mal_io.mal
        monetdb5/modules/mal/mal_mapi.c
        monetdb5/modules/mal/mdb.c
        monetdb5/modules/mal/remote.c
        monetdb5/optimizer/Makefile.ag
        monetdb5/optimizer/opt_pipes.c
        monetdb5/optimizer/opt_prelude.c
        monetdb5/optimizer/opt_prelude.h
        monetdb5/optimizer/opt_support.c
        monetdb5/optimizer/opt_wrapper.c
        sql/ChangeLog
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_optimizer.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_user.c
        sql/jdbc/tests/Tests/Test_CisValid.stable.err
        sql/test/BugTracker-2009/Tests/All
        sql/test/BugTracker-2016/Tests/All
        sql/test/emptydb/Tests/All
        testing/Mtest.py.in
        tools/mserver/monet_version.c.in
        tools/mserver/mserver5.c
Branch: mosaic
Log Message:

Merge with default


diffs (truncated from 39795 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -12,12 +12,7 @@
 %define with_int128 1
 %endif
 
-# only add .oidXX suffix if oid size differs from bit size
-%if %{bits} == 64 && %{?oid32:1}%{!?oid32:0}
-%define oidsuf .oid32
-%endif
-
-%define release %{buildno}%{?dist}%{?oidsuf}
+%define release %{buildno}%{?dist}
 
 # On RedHat Enterprise Linux and derivatives, if the Extra Packages
 # for Enterprise Linux (EPEL) repository is available, you can define
@@ -905,7 +900,6 @@ developer, but if you do want to test, t
        --enable-monetdb5=yes \
        --enable-netcdf=no \
        --enable-odbc=yes \
-       --enable-oid32=%{?oid32:yes}%{!?oid32:no} \
        --enable-optimize=yes \
        --enable-profile=no \
        
--enable-rintegration=%{?with_rintegration:yes}%{!?with_rintegration:no} \
diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -799,9 +799,6 @@
 /* Release name or "unreleased" */
 #define MONETDB_RELEASE "unreleased"
 
-/* Define if the oid type should use 32 bits on a 64-bit architecture */
-/* #undef MONET_OID32 */
-
 /* Suffix for C++ files */
 #define MX_CXX_SUFFIX "cxx"
 
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -280,19 +280,12 @@ create_winconfig_conds_new_py:
 !IFDEF BITS32
        $(ECHO) BITS32_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
        $(ECHO) BITS64_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
-       $(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ELSE
        $(ECHO) BITS32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !IFDEF BITS64
        $(ECHO) BITS64_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
-!IFDEF MONET_OID32
-       $(ECHO) BITS64OID32_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
-!ELSE
-       $(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
-!ENDIF
 !ELSE
        $(ECHO) BITS64_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
-       $(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
 !ENDIF
 !ENDIF
 !IFDEF CROSS_COMPILING
@@ -521,16 +514,6 @@ MAKEDEBUG=DEBUG=1
 
 PSAPILIB = psapi.lib
 
-# When compiled with plain `nmake`,
-# 64-bit OIDs are used by default on 64-bit Windows
-# (see monetdb_config.h.in for details);
-# compile with `nmake MONET_OID32=1` to use 32-bit OIDs on 64-bit Windows.
-!IF $(bits) == 64
-!IFDEF MONET_OID32
-CFLAGS = $(CFLAGS) -DMONET_OID32
-!ENDIF
-!ENDIF
-
 CONFIG_H = monetdb_config.h
 
 {$(srcdir)}.c.obj:
diff --git a/buildtools/ChangeLog b/buildtools/ChangeLog
--- a/buildtools/ChangeLog
+++ b/buildtools/ChangeLog
@@ -1,3 +1,12 @@
 # ChangeLog file for buildtools
 # This file is updated with Maddlog
 
+* Tue Jul 19 2016 Stefan Manegold <stefan.maneg...@cwi.nl>
+- With OID size equal to ABI/word size, mserver5 does not need to print
+  the OID size, anymore.
+- Removed obsolete code associated with long gone static linking option.
+
+* Mon Jul 18 2016 Sjoerd Mullender <sjo...@acm.org>
+- Removed configure option --enable-oid32 to compile with 32 bit OIDs
+  on a 64 bit architecture.
+
diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,4 +1,4 @@
 exports
 
HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIBPY&HAVE_LIBR&!HAVE_LIDAR&HAVE_NETCDF&HAVE_SAMTOOLS&HAVE_SHP&HAVE_SPHINXCLIENT?MAL-signatures
-!BITS32&!BITS64OID32&HAVE_FITS&HAVE_GEOM&HAVE_GSL&!HAVE_LIDAR&HAVE_NETCDF&HAVE_PCRE&HAVE_SHP&HAVE_SAMTOOLS?SQL-dump
+!BITS32&HAVE_FITS&HAVE_GEOM&HAVE_GSL&!HAVE_LIDAR&HAVE_NETCDF&HAVE_PCRE&HAVE_SHP&HAVE_SAMTOOLS?SQL-dump
 MERCURIAL?malcheck
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
@@ -1685,7 +1685,6 @@ int OPTprofilerImplementation(Client cnt
 int OPTprojectionpathImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
 int OPTpushselectImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 int OPTquerylogImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
-int OPTrecyclerImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
 int OPTreduceImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
 int OPTremapImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 int OPTremoteQueriesImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
@@ -1738,19 +1737,6 @@ str QOTshowPlan(Client cntxt, MalBlkPtr 
 void QOTstatisticsExit(void);
 void QOTupdateStatistics(str nme, int prop, lng val);
 QueryQueue QRYqueue;
-str RECYCLEappendSQL(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
-str RECYCLEcolumn(Client cntxt, str sch, str tbl, str col);
-str RECYCLEdeleteSQL(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
-void RECYCLEdrop(Client cntxt);
-str RECYCLEdropWrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
-void RECYCLEdump(stream *s);
-str RECYCLEdumpWrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-lng RECYCLEentry(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, 
RuntimeProfile prof);
-void RECYCLEexit(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p, 
RuntimeProfile prof);
-void RECYCLEinit(void);
-str RECYCLEresetBAT(Client cntxt, int bid);
-str RECYCLEresetBATwrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
-str RECYCLEsetCache(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
 str RMTbatload(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str RMTbincopyfrom(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str RMTbincopyto(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -2445,7 +2431,7 @@ InstrPtr newStmt(MalBlkPtr mb, const cha
 Symbol newSymbol(str nme, int kind);
 int newTmpVariable(MalBlkPtr mb, malType type);
 int newTypeVariable(MalBlkPtr mb, malType type);
-int newVariable(MalBlkPtr mb, str name, int len, malType type);
+int newVariable(MalBlkPtr mb, str name, size_t len, malType type);
 str nextRef;
 str notRef;
 str not_ilikeRef;
@@ -2529,9 +2515,6 @@ str rapiRef;
 int readConsole(Client cntxt);
 MalStkPtr reallocGlobalStack(MalStkPtr s, int cnt);
 str reconnectRef;
-MalBlkPtr recycleBlk;
-int recycleCacheLimit;
-str recycleRef;
 str reenterMAL(Client cntxt, MalBlkPtr mb, int startpc, int stoppc, MalStkPtr 
stk);
 str refineRef;
 str registerRef;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -499,22 +499,6 @@ AC_SUBST(bits)
 AM_CONDITIONAL(BITS32, test x"$bits" = x32)
 AM_CONDITIONAL(BITS64, test x"$bits" = x64)
 
-oids=$bits
-AC_ARG_ENABLE(oid32,
-       AS_HELP_STRING([--enable-oid32],
-               [use 32 bits for OIDs on a 64-bit architecture]),
-       enable_oid32=$enableval,
-       enable_oid32=no)
-AC_MSG_CHECKING(size of OIDs)
-case $bits-$enable_oid32 in
-64-yes)        AC_DEFINE(MONET_OID32, 1, [Define if the oid type should use 32 
bits on a 64-bit architecture])
-       oids=32
-       ;;
-esac
-AM_CONDITIONAL(BITS64OID32, test x"$bits-$enable_oid32" = x64-yes)
-AC_SUBST(oids)
-AC_MSG_RESULT($oids bits)
-
 AC_C_BIGENDIAN()
 
 LINUX_DIST=''
@@ -3804,7 +3788,7 @@ else
 fi
 echo
 echo "* Important options:"
-echo "    OID size:              ${oids} bits"
+echo "    OID size:              ${bits} bits"
 echo "    largest integer type: ${hge_bits} bits"
 echo "    largest decimal type: ${hge_digits} digits"
 echo
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -543,22 +543,9 @@ typedef signed char bit;
 typedef signed char bte;
 typedef short sht;
 
-#ifdef MONET_OID32
-#define SIZEOF_OID     SIZEOF_INT
-typedef unsigned int oid;
-#else
 #define SIZEOF_OID     SIZEOF_SIZE_T
 typedef size_t oid;
-#endif
-#if SIZEOF_OID == SIZEOF_SIZE_T
 #define OIDFMT         SZFMT
-#else
-#if SIZEOF_OID == SIZEOF_INT
-#define OIDFMT         "%u"
-#else
-#define OIDFMT         ULLFMT
-#endif
-#endif
 
 typedef int bat;               /* Index into BBP */
 typedef void *ptr;             /* Internal coding of types */
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -310,6 +310,7 @@ int GDK_vm_trim = 1;
  * fall-back for other compilers. */
 #include "gdk_atomic.h"
 static volatile ATOMIC_TYPE GDK_mallocedbytes_estimate = 0;
+static volatile ATOMIC_TYPE GDK_mallocedbytes_limit = 0;
 static volatile ATOMIC_TYPE GDK_vm_cursize = 0;
 #ifdef GDK_VM_KEEPHISTO
 volatile ATOMIC_TYPE GDK_vm_nallocs[MAX_BIT] = { 0 };
@@ -1682,6 +1683,11 @@ GDKmalloc_prefixsize(size_t size)
        return s;
 }
 
+gdk_export void GDKsetmemorylimit(size_t nbytes) {
+       GDK_mallocedbytes_limit = nbytes;
+}
+
+
 /*
  * The emergency flag can be set to force a fatal error if needed.
  * Otherwise, the caller is able to deal with the lack of memory.
@@ -1699,6 +1705,13 @@ GDKmallocmax(size_t size, size_t *maxsiz
                GDKfatal("GDKmallocmax: called with size " SZFMT "", size);
 #endif
        }
+#ifndef NDEBUG
+       /* fail malloc for testing purposes depending on set limit */
+       if (GDK_mallocedbytes_limit > 0 &&
+                       (GDK_mallocedbytes_estimate + size + 
MALLOC_EXTRA_SPACE) > GDK_mallocedbytes_limit) {
+               return NULL;
+       }
+#endif
        size = (size + 7) & ~7; /* round up to a multiple of eight */
        s = GDKmalloc_prefixsize(size);
        if (s == NULL) {
@@ -1711,6 +1724,7 @@ GDKmallocmax(size_t size, size_t *maxsiz
                        }
                        GDKfatal("GDKmallocmax: failed for " SZFMT " bytes", 
size);
                } else {
+                       /* TODO why are we printing this on stderr? */
                        fprintf(stderr, "#GDKmallocmax: recovery ok. 
Continuing..\n");
                }
        }
diff --git a/gdk/gdk_utils.h b/gdk/gdk_utils.h
--- a/gdk/gdk_utils.h
+++ b/gdk/gdk_utils.h
@@ -80,6 +80,9 @@ gdk_export size_t _MT_pagesize;
 gdk_export void MT_init(void); /*  init the package. */
 gdk_export int GDKinit(opt *set, int setlen);
 
+/* used for testing only */
+gdk_export void GDKsetmemorylimit(size_t nbytes);
+
 /*
  * Upon closing the session, all persistent BATs should be saved and
  * the transient BATs should be removed.  The buffer pool manager
diff --git a/java/tests/Test_CisValid.java b/java/tests/Test_CisValid.java
--- a/java/tests/Test_CisValid.java
+++ b/java/tests/Test_CisValid.java
@@ -18,15 +18,23 @@ public class Test_CisValid {
                Connection conn = DriverManager.getConnection(args[0]);
                Statement stmt = conn.createStatement();
 
-               conn.setAutoCommit(false); // start a transaction
                try {
+                       conn.setAutoCommit(false); // start a transaction
                        stmt.execute("SELECT COUNT(*) FROM doesnotexist;"); // 
let's trigger an error
                } catch (SQLException e) {
-                       e.printStackTrace();
-                       System.out.println("Validating connection: 
conn.isValid? " + conn.isValid(30)); // Can we rollback on this connection?
-                       conn.rollback();
+                       // e.printStackTrace();
+                       System.err.println("Expected error: " + e);
+
+                       try {
+                               // test calling conn.isValid()
+                               System.out.println("Validating connection: 
conn.isValid? " + conn.isValid(30));
+                               // Can we rollback on this connection without 
causing an error?
+                               conn.rollback();
+                       } catch (SQLException e2) {
+                               System.err.println("UnExpected error: " + e2);
+                       }
                }
-                       
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to