Changeset: f70d7218be46 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f70d7218be46
Modified Files:
        gdk/gdk_batop.c
        gdk/gdk_bbp.c
        gdk/gdk_logger.c
        monetdb5/mal/mal_session.c
        monetdb5/optimizer/opt_pipes.c
        sql/storage/store.c
        sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-0join-view.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-view.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-view.test
        sql/test/Tests/setoptimizer.test
Branch: Jan2022
Log Message:

Merge with Jul2021 branch.


diffs (95 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -699,7 +699,7 @@ BATappend2(BAT *b, BAT *n, BAT *s, bool 
        ALIGNapp(b, force, GDK_FAIL);
 
        if (ATOMstorage(ATOMtype(b->ttype)) != ATOMstorage(ATOMtype(n->ttype))) 
{
-               GDKerror("Incompatible operands.\n");
+               GDKerror("Incompatible operands ("ALGOBATFMT" vs. 
"ALGOBATFMT").\n", ALGOBATPAR(b), ALGOBATPAR(n));
                return GDK_FAIL;
        }
 
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1458,6 +1458,8 @@ BBPtrim(bool aggressive)
        if (!aggressive)
                flag |= BBPHOT;
        for (bat bid = 1, nbat = (bat) ATOMIC_GET(&BBPsize); bid < nbat; bid++) 
{
+               /* don't do this during a (sub)commit */
+               MT_lock_set(&GDKtmLock);
                MT_lock_set(&GDKswapLock(bid));
                BAT *b = NULL;
                bool swap = false;
@@ -1483,6 +1485,7 @@ BBPtrim(bool aggressive)
                                GDKerror("unload failed for bat %d", bid);
                        n++;
                }
+               MT_lock_unset(&GDKtmLock);
        }
        TRC_DEBUG(BAT_, "unloaded %d bats%s\n", n, aggressive ? " (also hot)" : 
"");
 }
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -762,8 +762,9 @@ la_bat_destroy(logger *lg, logaction *la
        if (bid < 0)
                return GDK_FAIL;
        if (!bid) {
-               GDKerror("la_bat_destroy failed to find bid for object %d\n", 
la->cid);
-               return GDK_FAIL;
+               GDKerror("la_bat_destroy failed to find bid for object %d 
(issue ignored)\n", la->cid);
+               GDKclrerr();
+               return GDK_SUCCEED;
        }
        if (logger_del_bat(lg, bid) != GDK_SUCCEED)
                return GDK_FAIL;
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -336,6 +336,7 @@ MSscheduleClient(str command, str challe
                                mnstr_printf(fout, "!could not allocate 
space\n");
                                exit_streams(fin, fout);
                                GDKfree(command);
+                               MCcloseClient(c);
                                return;
                        }
                }
@@ -344,7 +345,10 @@ MSscheduleClient(str command, str challe
                        mnstr_printf(c->fdout, "!%s\n", s);
                        mnstr_flush(c->fdout, MNSTR_FLUSH_DATA);
                        GDKfree(s);
+                       exit_streams(fin, fout);
+                       GDKfree(command);
                        MCcloseClient(c);
+                       return;
                }
                if (!GDKgetenv_isyes(mal_enableflag) &&
                                (strncasecmp("sql", lang, 3) != 0 && uid != 0)) 
{
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -3644,14 +3644,14 @@ sql_trans_rollback(sql_trans *tr, bool c
                tr->changes = NULL;
                tr->logchanges = 0;
        } else {
-               if (!commit_lock)
-                       MT_lock_set(&store->commit);
-               store_lock(store);
-               ulng oldest = store_oldest(store);
-               store_pending_changes(store, oldest);
-               store_unlock(store);
-               if (!commit_lock)
-                       MT_lock_unset(&store->commit);
+               if (commit_lock || MT_lock_try(&store->commit)) {
+                       store_lock(store);
+                       ulng oldest = store_oldest(store);
+                       store_pending_changes(store, oldest);
+                       store_unlock(store);
+                       if (!commit_lock)
+                               MT_lock_unset(&store->commit);
+               }
        }
        if (tr->localtmps.dset) {
                list_destroy2(tr->localtmps.dset, tr->store);
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to