Changeset: d44f09bcb3cc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d44f09bcb3cc
Modified Files:
        sql/server/rel_optimizer.c
        testing/Mtest.py.in
Branch: mtest
Log Message:

merge with Jun2020


diffs (64 lines):

diff --git a/monetdb5/optimizer/opt_generator.c 
b/monetdb5/optimizer/opt_generator.c
--- a/monetdb5/optimizer/opt_generator.c
+++ b/monetdb5/optimizer/opt_generator.c
@@ -71,14 +71,11 @@ OPTgeneratorImplementation(Client cntxt,
        char buf[256];
        lng usec= GDKusec();
        str msg = MAL_SUCCEED;
+       int needed = 0;
 
-       (void) cntxt;
        (void) stk;
        (void) pci;
 
-       series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop);
-       if(series == NULL)
-               throw(MAL,"optimizer.generator", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
        old = mb->stmt;
        limit = mb->stop;
        slimit = mb->ssize;
@@ -87,12 +84,16 @@ OPTgeneratorImplementation(Client cntxt,
        for( i=0; i < limit; i++){
                p = old[i];
                if ( getModuleId(p) == generatorRef && getFunctionId(p) == 
seriesRef)
-                       break;
+                       needed = 1;
+               if (p->token == RETURNsymbol || p->barrier == RETURNsymbol)
+                       return 0;
        }
-       if (i == limit) {
-               GDKfree(series);
+       if (!needed)
                return 0;
-       }
+
+       series = (InstrPtr*) GDKzalloc(sizeof(InstrPtr) * mb->vtop);
+       if(series == NULL)
+               throw(MAL,"optimizer.generator", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
 
        if (newMalBlkStmt(mb, mb->ssize) < 0) {
                GDKfree(series);
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -5527,7 +5527,7 @@ rel_push_project_down(visitor *v, sql_re
 
                if (rel_is_ref(l))
                        return rel;
-               if (is_base(l->op)) {
+               if (is_basetable(l->op)) {
                        if (list_check_prop_all(rel->exps, 
(prop_check_func)&exp_is_useless_rename)) {
                                /* TODO reduce list (those in the project + 
internal) */
                                rel->l = NULL;
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3225,7 +3225,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                         break
             elif CALL == "sqltest":
                 import MonetDBtesting.sqllogictest as sqllogictest
-                sql = sqllogictest.SQLLogic(ClntErr)
+                sql = sqllogictest.SQLLogic(out=ClntErr)
                 try:
                     sql.connect(hostname='localhost',
                                 port=int(env['MAPIPORT']),
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to