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

Merge with default


diffs (188 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -612,7 +612,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;
@@ -636,6 +636,10 @@ BATdel(BAT *b, BAT *d)
                        b->tnonil = 1;
                }
        }
+       /* not sure about these anymore */
+       b->tnosorted = b->tnorevsorted = 0;
+       b->tnokey[0] = b->tnokey[1] = 0;
+
        return GDK_SUCCEED;
 }
 
diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -20,15 +20,16 @@ tst019
 tst020
 tst021
 tst022
+tst023
 tst024
-#tst025
+tst025
 tst026
 tst027
 tst028
 tst029
 tst030
-#tst031
-#tst032
+tst031
+tst032
 tst033
 tst034
 tst035
diff --git a/monetdb5/mal/Tests/tst023.malC b/monetdb5/mal/Tests/tst023.malC
new file mode 100644
--- /dev/null
+++ b/monetdb5/mal/Tests/tst023.malC
@@ -0,0 +1,24 @@
+b1:= bat.new(:int);
+b2:= bat.new(:flt);
+
+bat.append(b1,1);
+bat.append(b1,2);
+bat.append(b1,3);
+bat.append(b1,4);
+bat.append(b1,2);
+
+bat.append(b2, 12.31);
+bat.append(b2, 12.32);
+bat.append(b2, 12.33);
+bat.append(b2, 12.34);
+bat.append(b2, 12.35);
+io.print(b1,b2);
+
+s:= algebra.subselect(b1,2,2,true,true,false);
+io.print(s);
+
+bat.delete(b1,s);
+io.print(b1);
+bat.delete(b2,s);
+io.print(b2);
+io.print(b1,b2);
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
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to