Changeset: ab3b66495ae6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab3b66495ae6
Modified Files:
        clients/mapiclient/Makefile.ag
        clients/mapilib/Makefile.ag
        common/options/monet_getopt.h
        common/options/monet_options.h
        sql/server/sql_mvc.c
        sql/storage/bat/bat_storage.c
        sql/storage/store.c
        tools/merovingian/client/Tests/monetdb_status.py
        tools/mserver/Makefile.ag
Branch: gdk_tracer
Log Message:

merged with default


diffs (223 lines):

diff --git a/clients/mapiclient/Makefile.ag b/clients/mapiclient/Makefile.ag
--- a/clients/mapiclient/Makefile.ag
+++ b/clients/mapiclient/Makefile.ag
@@ -18,6 +18,7 @@ bin_mclient = {
                ../mapilib/libmapi \
                ../../common/stream/libstream \
                ../../common/utils/libmutils \
+               WIN32?../../common/options/libmoptions \
                $(READLINE_LIBS) \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
@@ -28,6 +29,7 @@ bin_msqldump = {
                ../mapilib/libmapi \
                ../../common/stream/libstream \
                ../../common/utils/libmutils \
+               WIN32?../../common/options/libmoptions \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
@@ -37,6 +39,7 @@ bin_stethoscope = {
                ../mapilib/libmapi \
                ../../common/stream/libstream \
                ../../common/utils/libmutils \
+               WIN32?../../common/options/libmoptions \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
@@ -46,6 +49,7 @@ bin_tachograph = {
                ../mapilib/libmapi \
                ../../common/stream/libstream \
                ../../common/utils/libmutils \
+               WIN32?../../common/options/libmoptions \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
@@ -55,6 +59,7 @@ bin_tomograph = {
                ../../common/utils/libmutils \
                ../mapilib/libmapi \
                ../../common/stream/libstream \
+               WIN32?../../common/options/libmoptions \
                $(SOCKET_LIBS) $(zlib_LIBS) $(bzip2_LIBS) $(snappy_LIBS) 
$(lz4_LIBS) $(liblzma_LIBS) $(curl_LIBS) $(LTLIBICONV) $(openssl_LIBS)
 }
 
diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag
--- a/clients/mapilib/Makefile.ag
+++ b/clients/mapilib/Makefile.ag
@@ -12,8 +12,7 @@ INCLUDES = ../../common/stream ../../com
 lib_mapi = {
        VERSION = $(MAPI_VERSION)
        SOURCES = mapi.c mapi.rc
-       LIBS = ../../common/options/libmoptions \
-               ../../common/utils/libmcrypt \
+       LIBS = ../../common/utils/libmcrypt \
                WIN32?../../common/stream/libstream \
                WIN32?../../common/utils/libmutils \
                WIN32?$(SOCKET_LIBS) \
diff --git a/common/options/monet_getopt.h b/common/options/monet_getopt.h
--- a/common/options/monet_getopt.h
+++ b/common/options/monet_getopt.h
@@ -48,15 +48,15 @@ extern "C" {
 
 #ifndef moptions_export
 /* avoid using "#ifdef WIN32" so that this file does not need our config.h */
-#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
-#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
-#define moptions_export extern __declspec(dllimport)
-#else
-#define moptions_export extern __declspec(dllexport)
-#endif
-#else
+//#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+//#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
+//#define moptions_export extern __declspec(dllimport)
+//#else
+//#define moptions_export extern __declspec(dllexport)
+//#endif
+//#else
 #define moptions_export extern
-#endif
+//#endif
 #endif
 
 /* For communication from `getopt' to the caller.
diff --git a/common/options/monet_options.h b/common/options/monet_options.h
--- a/common/options/monet_options.h
+++ b/common/options/monet_options.h
@@ -27,15 +27,15 @@ extern "C" {
 
 #ifndef moptions_export
 /* avoid using "#ifdef WIN32" so that this file does not need our config.h */
-#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
-#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
-#define moptions_export extern __declspec(dllimport)
-#else
-#define moptions_export extern __declspec(dllexport)
-#endif
-#else
+//#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+//#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI)
+//#define moptions_export extern __declspec(dllimport)
+//#else
+//#define moptions_export extern __declspec(dllexport)
+//#endif
+//#else
 #define moptions_export extern
-#endif
+//#endif
 #endif
 
 /* mo_print_options will print the option set on stderr */
diff --git a/sql/server/sql_mvc.c b/sql/server/sql_mvc.c
--- a/sql/server/sql_mvc.c
+++ b/sql/server/sql_mvc.c
@@ -522,23 +522,8 @@ build up the hash (not copied in the tra
                return msg;
        }
 
-       /*
-       while (tr->schema_updates && ATOMIC_GET(&store_nr_active) > 1) {
-               store_unlock();
-               MT_sleep_ms(100);
-               wait += 100;
-               if (wait > 1000) {
-                       (void)sql_error(m, 010, SQLSTATE(40000) "COMMIT: 
transaction is aborted because of DDL concurrency conflicts, will ROLLBACK 
instead");
-                       mvc_rollback(m, chain, name, false);
-                       return -1;
-               }
-               store_lock();
-       }
-        * */
        /* validation phase */
        int valide = sql_trans_validate(tr);
-
-
        if (valide) {
                store_unlock();
                if (sql_save_snapshots(tr) != SQL_OK) {
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -2119,13 +2119,14 @@ clear_del(sql_trans *tr, sql_table *t)
 static int 
 gtr_update_delta( sql_trans *tr, sql_delta *cbat, int *changes, int id, int 
tpe)
 {
-       int ok = LOG_OK;
+       int ok = LOG_OK, cleared = 0;
        BAT *ins, *cur;
 
        (void)tr;
        assert(ATOMIC_GET(&store_nr_active)==0);
        
        if (!cbat->bid) {
+               cleared = 1;
                cbat->bid = logger_find_bat(bat_logger, cbat->name, tpe, id);
                temp_dup(cbat->bid);
        }
@@ -2139,6 +2140,14 @@ gtr_update_delta( sql_trans *tr, sql_del
                return LOG_ERR;
        }
        assert(!isEbat(cur));
+       /* A snapshot column after being cleared */
+       if (cbat->bid == cbat->ibid && cleared) {
+               cbat->cnt = cbat->ibase = BATcount(cur);
+               temp_destroy(cbat->ibid);
+               cbat->ibid = e_bat(cur->ttype);
+               if(cbat->ibid == BID_NIL)
+                       ok = LOG_ERR;
+       } else
        /* any inserts */
        if (BUNlast(ins) > 0 || cbat->cleared) {
                (*changes)++;
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -214,7 +214,7 @@ sql_trans_destroy(sql_trans *t, bool try
 
        TRC_DEBUG(SQL_STORE, "Destroy transaction: %p\n", t);
 
-       if (res == gtrans && spares < MAX_SPARES && !t->name && try_spare) {
+       if (res == gtrans && spares < ((GDKdebug & FORCEMITOMASK) ? 2 : 
MAX_SPARES) && !t->name && try_spare) {
                TRC_DEBUG(SQL_STORE, "Spared '%d' transactions '%p'\n", spares, 
t);
                trans_drop_tmp(t);
                spare_trans[spares++] = t;
@@ -236,7 +236,7 @@ destroy_spare_transactions(void)
 {
        int i, s = spares;
 
-       spares = MAX_SPARES; /* ie now there not spared anymore */
+       spares = (GDKdebug & FORCEMITOMASK)? 2 : MAX_SPARES; /* ie now there 
not spared anymore */
        for (i = 0; i < s; i++) {
                sql_trans_destroy(spare_trans[i], false);
        }
diff --git a/tools/merovingian/client/Tests/monetdb_status.py 
b/tools/merovingian/client/Tests/monetdb_status.py
--- a/tools/merovingian/client/Tests/monetdb_status.py
+++ b/tools/merovingian/client/Tests/monetdb_status.py
@@ -17,7 +17,7 @@ if not tstdb or not dbfarm:
 
 cmd = "monetdb status"
 
-response = subprocess.check_output(cmd)
+response = subprocess.check_output(cmd, shell=True)
 
 sys.stdout.write(response.decode("utf-8"))
 sys.stderr.write(serr)
diff --git a/tools/mserver/Makefile.ag b/tools/mserver/Makefile.ag
--- a/tools/mserver/Makefile.ag
+++ b/tools/mserver/Makefile.ag
@@ -48,6 +48,7 @@ bin_mserver5 = {
        SOURCES = mserver5.c monet_version.h monet_version.c.in
        LIBS = ../../monetdb5/tools/libmonetdb5 \
                ../../gdk/libbat \
+               ../../common/options/libmoptions \
                ../../common/stream/libstream \
                ../../clients/mapilib/libmapi \
                $(UUID_LIBS) \
@@ -75,6 +76,7 @@ bin_shutdowntest = {
        SOURCES = shutdowntest.c
        LIBS = ../../monetdb5/tools/libmonetdb5 \
                ../../gdk/libbat \
+               ../../common/options/libmoptions \
                ../../common/stream/libstream \
                ../../clients/mapilib/libmapi \
                $(UUID_LIBS) \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to