Changeset: 3b1b98bdb692 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3b1b98bdb692
Modified Files:
        sql/storage/store.c
        
sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
        sql/test/pg_regress/Tests/interval.stable.out
        testing/Mtest.py.in
Branch: default
Log Message:

Merge with Nov2019


diffs (127 lines):

diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1044,25 +1044,25 @@ set_members(changeset *ts)
 {
        node *n, *m;
 
-       if (ts && ts->set)
-       for (n = ts->set->h; n; n = n->next) {
-               sql_table *t = n->data;
-
-               if (isMergeTable(t) || isReplicaTable(t)) {
-                       if (t->members.set)
-                       for (m = t->members.set->h; m; m = m->next) {
-                               sql_part *p = m->data;
-                               sql_table *pt = find_sql_table(t->s, 
p->base.name);
-
-                               p->t = pt;
-                               pt->p = t;
+       if (ts && ts->set) {
+               for (n = ts->set->h; n; n = n->next) {
+                       sql_table *t = n->data;
+                       t->p = NULL;
+               }
+               for (n = ts->set->h; n; n = n->next) {
+                       sql_table *t = n->data;
+
+                       if (isMergeTable(t) || isReplicaTable(t)) {
+                               if (t->members.set)
+                               for (m = t->members.set->h; m; m = m->next) {
+                                       sql_part *p = m->data;
+                                       sql_table *pt = find_sql_table(t->s, 
p->base.name);
+       
+                                       p->t = pt;
+                                       pt->p = t;
+                               }
                        }
                }
-               if(t->p) {
-                       sql_part *pt = find_sql_part(t->p, t->base.name);
-                       if(!pt)
-                               t->p = NULL;
-               }
        }
 }
 
diff --git 
a/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py 
b/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
--- 
a/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
+++ 
b/sql/test/BugTracker-2019/Tests/remote-table-non-existent-column.Bug-6750.py
@@ -22,6 +22,7 @@ def freeport():
 farm_dir = tempfile.mkdtemp()
 
 prt1 = freeport()
+os.makedirs(os.path.join(farm_dir, 'node1'))
 prc1 = process.server(mapiport=prt1, dbname='node1', 
dbfarm=os.path.join(farm_dir, 'node1'), stdin=process.PIPE, 
stdout=process.PIPE, stderr=process.PIPE)
 conn1 = pymonetdb.connect(database='node1', port=prt1, autocommit=True)
 cur1 = conn1.cursor()
@@ -33,13 +34,20 @@ cur1.execute("insert into tab2 values (1
 cur1.execute("commit;")
 
 prt2 = freeport()
+os.makedirs(os.path.join(farm_dir, 'node2'))
 prc2 = process.server(mapiport=prt2, dbname='node2', 
dbfarm=os.path.join(farm_dir, 'node2'), stdin=process.PIPE, 
stdout=process.PIPE, stderr=process.PIPE)
 conn2 = pymonetdb.connect(database='node2', port=prt2, autocommit=True)
 cur2 = conn2.cursor()
 cur2.execute("create remote table tab1 (col1 clob, col2 int) on 
'mapi:monetdb://localhost:"+str(prt1)+"/node1';")
 cur2.execute("create remote table tab2 (col1 double) on 
'mapi:monetdb://localhost:"+str(prt1)+"/node1';")
-cur2.execute("select col2 from tab1;")  # col2 doesn't exist
-cur2.execute("select col1 from tab2;")  # col1 is not a floating point column
+try:
+    cur2.execute("select col2 from tab1;")  # col2 doesn't exist
+except pymonetdb.OperationalError as e:
+    print(e)
+try:
+    cur2.execute("select col1 from tab2;")  # col1 is not a floating point 
column
+except pymonetdb.OperationalError as e:
+    print(e)
 cur2.execute("drop table tab1;")
 cur2.execute("drop table tab2;")
 
diff --git a/sql/test/pg_regress/Tests/interval.stable.out 
b/sql/test/pg_regress/Tests/interval.stable.out
--- a/sql/test/pg_regress/Tests/interval.stable.out
+++ b/sql/test/pg_regress/Tests/interval.stable.out
@@ -75,7 +75,7 @@ stdout of test 'interval` in directory '
 % %2 # name
 % double # type
 % 24 # length
-[ 3.1756752e+13        ]
+[ 3.1756752e+10        ]
 #select min(f1) from interval_tbl;
 % sys.%1 # table_name
 % %1 # name
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -4220,6 +4220,7 @@ def main(argv) :
                     ErrXit("%s: not a valid test name" % args[0])
                 args = [head]
                 if tail != 'All':
+                    CONDITIONALS['KNOWNFAIL'] = 'execute'
                     for ext in ('_s00.malC', '_p00.malC', '_s00.sql',
                                 '_p00.sql', '.MAL.py', '.SQL.py', '.malC',
                                 '.sql', '.py', '.R', ''):
@@ -4236,6 +4237,7 @@ def main(argv) :
                     else:
                         ErrXit("%s: not a valid test name" % args[0])
             elif head and tail and os.path.isdir(head) and tail != 'Tests' and 
os.path.isdir(os.path.join(head, 'Tests')):
+                CONDITIONALS['KNOWNFAIL'] = 'execute'
                 args = [head, tail]
 
         if   len(args) == 1:
@@ -4251,6 +4253,7 @@ def main(argv) :
             elif args[0] != "All":
                 #TODO:
                 # check, whether args[0] in All
+                CONDITIONALS['KNOWNFAIL'] = 'execute'
                 testlist.append(args[0])
         elif len(args) > 1:
             i = 0
@@ -4263,6 +4266,7 @@ def main(argv) :
                     # WARNING/ERROR
                 i = i + 1
             if len(dirlist) == 1  and  i < len(args)  and  args[i] != "All":
+                CONDITIONALS['KNOWNFAIL'] = 'execute'
                 while i < len(args):
                     if os.sep not in args[i]:
                         #TODO:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to