Changeset: be369d1b4d68 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=be369d1b4d68
Added Files:
        monetdb5/mal/Tests/tst023.stable.err
        monetdb5/mal/Tests/tst023.stable.out
Modified Files:
        gdk/gdk_batop.c
Branch: Jun2016
Log Message:

Fix to BATdel.
Some properties weren't cleared, and there was a logic error in
determining when to move data.


diffs (136 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -652,7 +652,7 @@ BATdel(BAT *b, BAT *d)
                        nd++;
                        if (c == 0 || *o - b->hseqbase >= BATcount(b))
                                n = b->hseqbase + BATcount(b) - o[-1] - 1;
-                       else if ((oid) (o - s) > *o - *s)
+                       else if ((oid) (o - s) < *o - *s)
                                n = o[0] - o[-1] - 1;
                        else
                                n = 0;
@@ -676,6 +676,10 @@ BATdel(BAT *b, BAT *d)
                        b->T->nonil = 1;
                }
        }
+       /* not sure about these anymore */
+       b->T->nosorted = b->T->norevsorted = 0;
+       b->T->nokey[0] = b->T->nokey[1] = 0;
+
        return GDK_SUCCEED;
 }
 
diff --git a/monetdb5/mal/Tests/tst023.stable.err 
b/monetdb5/mal/Tests/tst023.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/Tests/tst023.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'tst023` in directory 'monetdb5/mal` itself:
+
+
+# 10:17:06 >  
+# 10:17:06 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36074" "--set" 
"mapi_usock=/var/tmp/mtest-8504/.s.monetdb.36074" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/ufs/sjoerd/Monet-stable/var/MonetDB/mTests_monetdb5_mal" "--set" 
"embedded_r=yes"
+# 10:17:06 >  
+
+# builtin opt  gdk_dbpath = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 36074
+# cmdline opt  mapi_usock = /var/tmp/mtest-8504/.s.monetdb.36074
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/ufs/sjoerd/Monet-stable/var/MonetDB/mTests_monetdb5_mal
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+
+# 10:17:07 >  
+# 10:17:07 >  "mclient" "-lmal" "-ftest" "-Eutf-8" 
"--host=/var/tmp/mtest-8504" "--port=36074"
+# 10:17:07 >  
+
+
+# 10:17:07 >  
+# 10:17:07 >  "Done."
+# 10:17:07 >  
+
diff --git a/monetdb5/mal/Tests/tst023.stable.out 
b/monetdb5/mal/Tests/tst023.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/Tests/tst023.stable.out
@@ -0,0 +1,68 @@
+stdout of test 'tst023` in directory 'monetdb5/mal` itself:
+
+
+# 10:17:06 >  
+# 10:17:06 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=36074" "--set" 
"mapi_usock=/var/tmp/mtest-8504/.s.monetdb.36074" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/ufs/sjoerd/Monet-stable/var/MonetDB/mTests_monetdb5_mal" "--set" 
"embedded_r=yes"
+# 10:17:06 >  
+
+# MonetDB 5 server v11.23.8 (hg id: b4168ee316f9+)
+# This is an unreleased version
+# Serving database 'mTests_monetdb5_mal', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit 
integers dynamically linked
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://madrid.da.cwi.nl:36074/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-8504/.s.monetdb.36074
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+
+# 10:17:07 >  
+# 10:17:07 >  "mclient" "-lmal" "-ftest" "-Eutf-8" 
"--host=/var/tmp/mtest-8504" "--port=36074"
+# 10:17:07 >  
+
+#--------------------------#
+# t    t       t  # name
+# void int     flt  # type
+#--------------------------#
+[ 0@0, 1,      12.31   ]
+[ 1@0, 2,      12.32   ]
+[ 2@0, 3,      12.33   ]
+[ 3@0, 4,      12.34   ]
+[ 4@0, 2,      12.35   ]
+#--------------------------#
+# h    t  # name
+# void oid  # type
+#--------------------------#
+[ 0@0, 1@0     ]
+[ 1@0, 4@0     ]
+#--------------------------#
+# h    t  # name
+# void int  # type
+#--------------------------#
+[ 0@0, 1       ]
+[ 1@0, 3       ]
+[ 2@0, 4       ]
+#--------------------------#
+# h    t  # name
+# void flt  # type
+#--------------------------#
+[ 0@0, 12.31   ]
+[ 1@0, 12.33   ]
+[ 2@0, 12.34   ]
+#--------------------------#
+# t    t       t  # name
+# void int     flt  # type
+#--------------------------#
+[ 0@0, 1,      12.31   ]
+[ 1@0, 3,      12.33   ]
+[ 2@0, 4,      12.34   ]
+
+# 10:17:07 >  
+# 10:17:07 >  "Done."
+# 10:17:07 >  
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to