Changeset: 32442811e200 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32442811e200
Modified Files:
        sql/server/rel_exp.c
        
sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-add.Bug-6630.stable.out
Branch: Apr2019
Log Message:

fixed early handing of null expressions


diffs (68 lines):

diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -1428,7 +1428,7 @@ exp_is_null(mvc *sql, sql_exp *e )
                list *l = e->l;
 
                if (!r && l)
-                       for (n = l->h; n && r; n = n->next) 
+                       for (n = l->h; n && !r; n = n->next) 
                                r |= exp_is_null(sql, n->data);
                return r;
        }
diff --git 
a/sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
 
b/sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
--- 
a/sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
+++ 
b/sql/test/BugTracker-2017/Tests/sqlitelogictest-cast-decimal.Bug-6445.stable.out
@@ -31,7 +31,7 @@ Ready.
 % real # type
 % 15 # length
 #SELECT col0 + - - CAST( NULL AS DECIMAL ) - + col0 + + col1 FROM tab1 cor0 
WHERE ( NULL ) IS NOT NULL;
-% sys.L3 # table_name
+% .L3 # table_name
 % L3 # name
 % decimal # type
 % 20 # length
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out
@@ -157,6 +157,12 @@ Ready.
 % bigint # type
 % 1 # length
 [ 1    ]
+#SELECT CAST ( NULL AS INTEGER ) - 1 - 1 + 2 * 70; --NULL
+% .L3 # table_name
+% L3 # name
+% hugeint # type
+% 1 # length
+[ NULL ]
 
 # 16:20:37 >  
 # 16:20:37 >  "Done."
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-aritmetic-expressions-handling.Bug-6576.stable.out.int128
@@ -157,6 +157,12 @@ Ready.
 % hugeint # type
 % 1 # length
 [ 1    ]
+#SELECT CAST ( NULL AS INTEGER ) - 1 - 1 + 2 * 70; --NULL
+% .L3 # table_name
+% L3 # name
+% hugeint # type
+% 1 # length
+[ NULL ]
 
 # 16:20:37 >  
 # 16:20:37 >  "Done."
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-add.Bug-6630.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-add.Bug-6630.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-add.Bug-6630.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-add.Bug-6630.stable.out
@@ -74,7 +74,7 @@ Ready.
 [ NULL ]
 #SELECT ALL CAST ( col1 / - - ( + CAST ( NULL AS INTEGER ) ) AS BIGINT ) col0,
 #           CAST ( 39 + + + CAST ( NULL AS INTEGER ) + + - 10 + col1 / - col0 
AS BIGINT ) AS col1 FROM tab2;
-% sys.L4,      .L10 # table_name
+% .L4, .L10 # table_name
 % col0,        col1 # name
 % bigint,      bigint # type
 % 1,   1 # length
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to