Changeset: fbe525731875 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fbe525731875
Modified Files:
        clients/odbc/tests/ODBCmetadata.c
        gdk/gdk_bat.c
        monetdb5/mal/mal_instruction.c
Branch: nilmask
Log Message:

approved output

fixed check for no nil value


diffs (72 lines):

diff --git a/clients/odbc/tests/ODBCmetadata.c 
b/clients/odbc/tests/ODBCmetadata.c
--- a/clients/odbc/tests/ODBCmetadata.c
+++ b/clients/odbc/tests/ODBCmetadata.c
@@ -1535,10 +1535,10 @@ main(int argc, char **argv)
                "function user.main():void;\n"
                "    X_1:void := querylog.define(\"explain select * from 
odbctst.\\\"LINES\\\";\":str, \"default_pipe\":str, 26:int);\n"
                "\n"
-               "    X_33:bat[:int] := bat.new(nil:int);\n"
-               "    X_34:bat[:int] := bat.new(nil:int);\n"
-               "    X_35:bat[:int] := bat.new(nil:int);\n"
-               "    X_36:bat[:int] := bat.new(nil:int);\n"
+               "    X_33:bat[:int] := bat.new(0:int);\n"
+               "    X_34:bat[:int] := bat.new(0:int);\n"
+               "    X_35:bat[:int] := bat.new(0:int);\n"
+               "    X_36:bat[:int] := bat.new(0:int);\n"
                "    X_38:bat[:str] := bat.pack(\"odbctst.LINES\":str, 
\"odbctst.LINES\":str, \"odbctst.LINES\":str, \"odbctst.LINES\":str);\n"
                "    X_39:bat[:str] := bat.pack(\"ORDERID\":str, \"LINES\":str, 
\"PARTID\":str, \"QUANTITY\":str);\n"
                "    X_40:bat[:str] := bat.pack(\"int\":str, \"int\":str, 
\"int\":str, \"decimal\":str);\n"
@@ -1558,10 +1558,10 @@ main(int argc, char **argv)
                "WLONGVARCHAR(174)\n"
                "function user.main():void;\n"
                "    X_1:void := querylog.define(\"explain select * from 
odbctst.\\\"LINES\\\";\":str, \"default_pipe\":str, 26:int);\n"
-               "    X_33:bat[:int] := bat.new(nil:int);\n"
-               "    X_34:bat[:int] := bat.new(nil:int);\n"
-               "    X_35:bat[:int] := bat.new(nil:int);\n"
-               "    X_36:bat[:int] := bat.new(nil:int);\n"
+               "    X_33:bat[:int] := bat.new(0:int);\n"
+               "    X_34:bat[:int] := bat.new(0:int);\n"
+               "    X_35:bat[:int] := bat.new(0:int);\n"
+               "    X_36:bat[:int] := bat.new(0:int);\n"
                "    X_38:bat[:str] := bat.pack(\"odbctst.LINES\":str, 
\"odbctst.LINES\":str, \"odbctst.LINES\":str, \"odbctst.LINES\":str);\n"
                "    X_39:bat[:str] := bat.pack(\"ORDERID\":str, \"LINES\":str, 
\"PARTID\":str, \"QUANTITY\":str);\n"
                "    X_40:bat[:str] := bat.pack(\"int\":str, \"int\":str, 
\"int\":str, \"decimal\":str);\n"
@@ -1623,10 +1623,10 @@ main(int argc, char **argv)
                /* next is the original output but it is varying a lot on usec 
values, X_## values and even the order of rows,
                   so all data is replaced (see above) for stable output 
comparison.
                        "1          X_1=0@0:void := querylog.define(\"trace 
select * from odbctst.\\\"LINES\\\";\":str, \"default_pipe\":str, 26:int);\n"
-                       "9          X_33=[0]:bat[:int] := bat.new(nil:int);\n"
-                       "8          X_34=[0]:bat[:int] := bat.new(nil:int);\n"
-                       "7          X_36=[0]:bat[:int] := bat.new(nil:int);\n"
-                       "6          X_35=[0]:bat[:int] := bat.new(nil:int);\n"
+                       "9          X_33=[0]:bat[:int] := bat.new(0:int);\n"
+                       "8          X_34=[0]:bat[:int] := bat.new(0:int);\n"
+                       "7          X_36=[0]:bat[:int] := bat.new(0:int);\n"
+                       "6          X_35=[0]:bat[:int] := bat.new(0:int);\n"
                        "8          X_41=[4]:bat[:int] := bat.pack(32:int, 
32:int, 32:int, 9:int);\n"
                        "13         X_42=[4]:bat[:int] := bat.pack(0:int, 
0:int, 0:int, 3:int);\n"
                        "14         X_38=[4]:bat[:str] := 
bat.pack(\"odbctst.LINES\":str, \"odbctst.LINES\":str, \"odbctst.LINES\":str, 
\"odbctst.LINES\":str);\n"
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -1770,7 +1770,7 @@ BUNinplacemulti(BAT *b, const oid *posit
                        BATkey(b, false);
                } else if (!b->tkey && (b->tnokey[0] == p || b->tnokey[1] == p))
                        b->tnokey[0] = b->tnokey[1] = 0;
-               if (b->tnonil && (ATOMstorage(b->ttype) != TYPE_msk || 
!atomnil))
+               if (b->tnonil && ATOMstorage(b->ttype) != TYPE_msk && atomnil)
                        b->tnonil = t && ATOMcmp(b->ttype, t, atomnil) != 0;
                MT_lock_unset(&b->theaplock);
        }
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -1082,7 +1082,7 @@ fndConstant(MalBlkPtr mb, const ValRecor
        for (i=k; i < mb->vtop - 1; i++){
                VarPtr v = getVar(mb, i);
                if (v->constant){
-                       if (v && v->type == cst->vtype && v->value.len == 
cst->len && ATOMcmp(cst->vtype, VALptr(&v->value), p) == 0)
+                       if (v && v->type == cst->vtype && v->value.len == 
cst->len && ((!p && !VALptr(&v->value)) || (p && ATOMcmp(cst->vtype, 
VALptr(&v->value), p) == 0)))
                                return i;
                }
        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to