Changeset: a351b9e83c47 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a351b9e83c47
Modified Files:
        monetdb5/optimizer/opt_mergetable.c
        sql/backends/monet5/UDF/capi/capi.c
Branch: default
Log Message:

Merge with Sep2022 branch.


diffs (81 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -430,7 +430,8 @@ mat_apply1(MalBlkPtr mb, InstrPtr p, mat
                is_assign = (n >= 0);
        }
 
-       if((r = newInstructionArgs(mb, matRef, packRef, mat[m].mi->argc)) == 
NULL)
+       if(m < 0 ||
+          (r = newInstructionArgs(mb, matRef, packRef, mat[m].mi->argc)) == 
NULL)
                return -1;
        getArg(r, 0) = getArg(p,0);
        tpe = getArgType(mb,p,0);
@@ -501,6 +502,7 @@ mat_apply(MalBlkPtr mb, InstrPtr p, matl
                return mat_apply1(mb, p, ml, is_a_mat(getArg(p,1),ml), 1);
        assert(nrmats <= 8);
 
+       assert(p->retc < p->argc);      /* i.e. matvar[0] gets initialized */
        for(k=p->retc, l=0; k < p->argc; k++) {
                int mv = is_a_mat(getArg(p,k), ml);
                if (mv >=0) {
diff --git a/sql/backends/monet5/UDF/capi/capi.c 
b/sql/backends/monet5/UDF/capi/capi.c
--- a/sql/backends/monet5/UDF/capi/capi.c
+++ b/sql/backends/monet5/UDF/capi/capi.c
@@ -473,7 +473,7 @@ static str CUDFeval(Client cntxt, MalBlk
 
        lng initial_output_count = -1;
 
-       struct sigaction sa, oldsa, oldsb;
+       struct sigaction sa = (struct sigaction) {.sa_flags = 0}, oldsa, oldsb;
        sigset_t signal_set;
 
 #ifdef NDEBUG
@@ -526,8 +526,6 @@ static str CUDFeval(Client cntxt, MalBlk
                (void)sigaddset(&signal_set, SIGSEGV);
                (void)sigaddset(&signal_set, SIGBUS);
                (void)pthread_sigmask(SIG_UNBLOCK, &signal_set, NULL);
-
-               sa = (struct sigaction) {.sa_flags = 0,};
        }
 
        sqlfun = *(sql_func **)getArgReference_ptr(stk, pci, pci->retc);
@@ -1405,7 +1403,7 @@ static str CUDFeval(Client cntxt, MalBlk
                        errno = 0;
                        goto wrapup;
                }
-               sa = (struct sigaction) {.sa_flags = 0,};
+               sa = (struct sigaction) {.sa_flags = 0};
        }
 
        if (msg) {
diff --git a/sql/test/bincopy/Tests/bincopy_nulls.py 
b/sql/test/bincopy/Tests/bincopy_nulls.py
--- a/sql/test/bincopy/Tests/bincopy_nulls.py
+++ b/sql/test/bincopy/Tests/bincopy_nulls.py
@@ -24,16 +24,14 @@ class TestCase:
     little_endian_bits: bytes
     big_endian_bits: bytes
     expected: List[Any]
-    if_exists: bool
 
     def __init__(self,
                  sqltype: str, byteswap_size: int, expected: List[Any],
                  little_endian_bits: bytes,
-                 big_endian_bits: Optional[bytes] = None, if_exists=False):
+                 big_endian_bits: Optional[bytes] = None):
         self.sqltype = sqltype
         self.little_endian_bits = little_endian_bits
         self.expected = expected
-        self.if_exists = if_exists
         if big_endian_bits:
             self.big_endian_bits = big_endian_bits
         elif byteswap_size > 0:
@@ -42,7 +40,7 @@ class TestCase:
             self.big_endian_bits = None
 
     def run(self, conn: pymonetdb.Connection, big_endian=False):
-        if self.if_exists and self.sqltype not in SUPPORTED_TYPES:
+        if self.sqltype not in SUPPORTED_TYPES:
             print(f"SKIP    {self.sqltype}")
             print()
             return
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to