Changeset: 38c03afee6e7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=38c03afee6e7
Added Files:
        sql/test/BugTracker-2015/Tests/crash.Bug-3736.sql
        sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.err
        sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
Modified Files:
        sql/server/rel_optimizer.c
        sql/test/BugTracker-2015/Tests/All
Branch: Oct2014
Log Message:

fixed bug 3736, protect agains empty expression lists


diffs (truncated from 319 to 300 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -6896,6 +6896,7 @@ rel_apply_rewrite(int *changes, mvc *sql
                                r->r = rel->l;
                        }
                        /* unbind join exps */
+                       if (r->exps)
                        for (n=r->exps->h; n; n = n->next) {
                                sql_exp *e = n->data;
                                assert(e->type == e_cmp);
diff --git a/sql/test/BugTracker-2015/Tests/All 
b/sql/test/BugTracker-2015/Tests/All
--- a/sql/test/BugTracker-2015/Tests/All
+++ b/sql/test/BugTracker-2015/Tests/All
@@ -33,3 +33,4 @@ adddrop_unknown_table.Bug-3718
 outerjoin_project.Bug-3725
 left_shift_inet.Bug-3730
 true_or_predicate.Bug-3733
+crash.Bug-3736
diff --git a/sql/test/BugTracker-2015/Tests/crash.Bug-3736.sql 
b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.sql
@@ -0,0 +1,114 @@
+
+
+CREATE TABLE open_auctions (
+         id int NOT NULL AUTO_INCREMENT,
+         open_auction_id varchar(255) NOT NULL,
+         initial double NOT NULL,
+         reserve double NOT NULL,
+         aktuell double NOT NULL,
+         privacy varchar(255) NOT NULL,
+         itemref varchar(255) NOT NULL,
+         seller varchar(255) NOT NULL,
+         quantity double NOT NULL,
+         type varchar(255) NOT NULL,
+         start varchar(255) NOT NULL,
+         ende varchar(255) NOT NULL,
+         PRIMARY KEY (id)
+);
+
+INSERT INTO "open_auctions" ("id", "open_auction_id", "initial", "reserve", 
"aktuell", "privacy", "itemref", "seller", "quantity", "type", "start", "ende") 
VALUES
+(1, 'open_auction0', 210.62, 1540.75, 263.12, 'No', 'item0', 'person11', 1, 
'Regular', '02/27/1998', '03/09/1999'),
+(2, 'open_auction1', 69.64, 398.65, 168.64, '', 'item2', 'person10', 1, 
'Featured', '06/14/1998', '02/27/1999'),
+(3, 'open_auction2', 13.9, 0, 16.9, 'No', 'item3', 'person11', 1, 'Featured', 
'07/16/2000', '10/22/2000'),
+(4, 'open_auction3', 17.12, 0, 179.12, '', 'item5', 'person13', 1, 'Featured', 
'02/01/2001', '07/22/1999'),
+(5, 'open_auction4', 38.21, 116.91, 219.71, 'No', 'item7', 'person11', 4, 
'Regular, Dutch', '08/05/2000', '01/09/1999'),
+(6, 'open_auction5', 75.95, 174.84, 116.45, 'No', 'item9', 'person7', 1, 
'Featured', '01/27/2001', '10/08/1999'),
+(7, 'open_auction6', 67.27, 0, 77.77, 'Yes', 'item10', 'person14', 1, 
'Featured', '12/15/2001', '07/13/1999'),
+(8, 'open_auction7', 35.53, 133.36, 73.03, 'Yes', 'item12', 'person16', 1, 
'Regular', '04/06/2001', '04/11/2000'),
+(9, 'open_auction8', 92.54, 0, 101.54, '', 'item13', 'person12', 1, 'Regular', 
'10/20/1998', '02/04/2001'),
+(10, 'open_auction9', 9.88, 0, 137.38, '', 'item14', 'person10', 1, 
'Featured', '06/16/1998', '12/05/2000'),
+(11, 'open_auction10', 86.28, 0, 239.28, 'Yes', 'item16', 'person8', 1, 
'Featured', '06/26/2000', '02/04/1998'),
+(12, 'open_auction11', 4.12, 24.53, 38.62, '', 'item17', 'person12', 1, 
'Regular', '11/03/1999', '03/02/2000');
+
+CREATE TABLE bidder (
+         id int NOT NULL AUTO_INCREMENT,
+         open_auction_id varchar(255) NOT NULL,
+         date varchar(255) NOT NULL,
+         time varchar(255) NOT NULL,
+         personref varchar(255) NOT NULL,
+         increase double NOT NULL,
+         PRIMARY KEY (id)
+);
+--
+-- Daten für Tabelle "bidder"
+--
+
+INSERT INTO "bidder" ("id", "open_auction_id", "date", "time", "personref", 
"increase") VALUES
+(1, 'open_auction0', '06/13/2001', '13:16:15', 'person0', 18),
+(2, 'open_auction0', '09/18/2000', '11:29:44', 'person23', 12),
+(3, 'open_auction0', '01/07/1998', '10:23:59', 'person14', 18),
+(4, 'open_auction0', '07/10/2001', '14:00:39', 'person16', 4.5),
+(5, 'open_auction1', '11/12/1998', '11:23:38', 'person20', 4.5),
+(6, 'open_auction1', '10/02/2000', '22:48:00', 'person4', 15),
+(7, 'open_auction1', '12/04/1998', '22:29:38', 'person23', 1.5),
+(8, 'open_auction1', '06/22/1999', '12:43:47', 'person19', 15),
+(9, 'open_auction1', '12/02/2001', '13:38:51', 'person15', 45),
+(10, 'open_auction1', '11/12/2001', '04:50:27', 'person9', 6),
+(11, 'open_auction1', '05/21/2001', '08:02:16', 'person5', 12),
+(12, 'open_auction2', '12/04/2000', '14:03:16', 'person5', 3),
+(13, 'open_auction3', '09/03/2000', '22:45:30', 'person8', 10.5),
+(14, 'open_auction3', '08/18/1998', '17:13:40', 'person22', 25.5),
+(15, 'open_auction3', '06/05/1998', '11:57:56', 'person19', 16.5),
+(16, 'open_auction3', '09/20/1999', '00:39:18', 'person5', 46.5),
+(17, 'open_auction3', '10/03/2001', '01:08:59', 'person23', 58.5),
+(18, 'open_auction3', '02/17/2001', '07:13:32', 'person20', 4.5),
+(19, 'open_auction4', '10/19/1998', '09:00:31', 'person7', 33),
+(20, 'open_auction4', '03/11/2001', '01:59:02', 'person8', 9),
+(21, 'open_auction4', '04/16/2001', '23:37:09', 'person8', 6),
+(22, 'open_auction4', '03/06/1999', '12:19:57', 'person5', 4.5),
+(23, 'open_auction4', '02/01/2000', '09:37:51', 'person21', 18),
+(24, 'open_auction4', '01/09/1999', '19:31:44', 'person1', 31.5),
+(25, 'open_auction4', '11/11/2001', '05:24:08', 'person16', 27),
+(26, 'open_auction4', '11/19/1998', '16:16:17', 'person10', 7.5),
+(27, 'open_auction4', '04/05/1999', '00:37:15', 'person17', 7.5),
+(28, 'open_auction4', '09/14/1999', '12:00:43', 'person12', 37.5),
+(29, 'open_auction5', '07/07/2000', '08:53:00', 'person15', 6),
+(30, 'open_auction5', '08/06/2001', '10:16:15', 'person13', 4.5),
+(31, 'open_auction5', '08/23/1999', '08:26:06', 'person17', 30),
+(32, 'open_auction6', '01/23/2000', '17:14:42', 'person1', 10.5),
+(33, 'open_auction7', '10/14/1999', '14:39:18', 'person16', 27),
+(34, 'open_auction7', '05/19/1999', '23:51:16', 'person14', 9),
+(35, 'open_auction7', '03/27/1999', '19:14:39', 'person23', 1.5),
+(36, 'open_auction8', '04/26/2001', '00:41:04', 'person12', 9),
+(37, 'open_auction9', '04/03/1999', '19:09:46', 'person22', 18),
+(38, 'open_auction9', '01/21/1999', '08:14:44', 'person19', 19.5),
+(39, 'open_auction9', '11/24/1999', '02:12:12', 'person11', 12),
+(40, 'open_auction9', '01/07/2001', '05:33:55', 'person7', 9),
+(41, 'open_auction9', '07/28/2000', '00:57:52', 'person16', 16.5),
+(42, 'open_auction9', '01/28/2000', '20:24:02', 'person23', 1.5),
+(43, 'open_auction9', '05/13/2001', '02:45:46', 'person13', 1.5),
+(44, 'open_auction9', '12/06/2000', '15:18:07', 'person21', 24),
+(45, 'open_auction9', '08/16/1998', '09:27:27', 'person14', 3),
+(46, 'open_auction9', '06/18/2001', '19:57:53', 'person7', 3),
+(47, 'open_auction9', '12/13/2001', '09:01:23', 'person2', 12),
+(48, 'open_auction9', '03/18/2001', '08:59:02', 'person13', 7.5),
+(49, 'open_auction10', '08/14/1998', '16:33:46', 'person23', 33),
+(50, 'open_auction10', '03/24/1998', '11:45:48', 'person3', 1.5),
+(51, 'open_auction10', '10/08/1998', '06:20:35', 'person1', 45),
+(52, 'open_auction10', '01/12/1998', '21:43:02', 'person3', 15),
+(53, 'open_auction10', '03/02/2001', '20:20:33', 'person0', 9),
+(54, 'open_auction10', '03/01/2000', '10:08:07', 'person23', 10.5),
+(55, 'open_auction10', '07/19/2001', '00:50:29', 'person6', 9),
+(56, 'open_auction10', '10/04/2001', '00:58:25', 'person4', 3),
+(57, 'open_auction10', '11/27/1998', '00:15:23', 'person21', 27),
+(58, 'open_auction11', '05/16/1998', '15:08:01', 'person1', 15),
+(59, 'open_auction11', '05/08/2000', '06:44:20', 'person3', 4.5),
+(60, 'open_auction11', '10/22/2001', '15:34:49', 'person4', 15);
+
+Select b.* FROM open_auctions o, b bidder WHERE (select b3.INCREASE from 
bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+
+plan Select b.* FROM open_auctions o, bidder b WHERE (select b3.INCREASE from 
bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+Select b.* FROM open_auctions o, bidder b WHERE (select b3.INCREASE from 
bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+
+drop table bidder;
+drop table open_auctions;
diff --git a/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.err 
b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.err
@@ -0,0 +1,40 @@
+stderr of test 'crash.Bug-3736` in directory 'sql/test/BugTracker-2015` itself:
+
+
+# 10:50:37 >  
+# 10:50:37 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38510" "--set" 
"mapi_usock=/var/tmp/mtest-30636/.s.monetdb.38510" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2015"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 10:50:37 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/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 = 38510
+# cmdline opt  mapi_usock = /var/tmp/mtest-30636/.s.monetdb.38510
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2015
+# cmdline opt  mal_listing = 0
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+
+# 10:50:37 >  
+# 10:50:37 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-30636" "--port=38510"
+# 10:50:37 >  
+
+MAPI  = (monetdb) /var/tmp/mtest-30636/.s.monetdb.38510
+QUERY = Select b.* FROM open_auctions o, b bidder WHERE (select b3.INCREASE 
from bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+ERROR = !SELECT: no such table 'b'
+
+# 10:50:38 >  
+# 10:50:38 >  "Done."
+# 10:50:38 >  
+
diff --git a/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out 
b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
@@ -0,0 +1,131 @@
+stdout of test 'crash.Bug-3736` in directory 'sql/test/BugTracker-2015` itself:
+
+
+# 10:50:37 >  
+# 10:50:37 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38510" "--set" 
"mapi_usock=/var/tmp/mtest-30636/.s.monetdb.38510" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2015"
 "--set" "mal_listing=0" "--set" "embedded_r=yes"
+# 10:50:37 >  
+
+# MonetDB 5 server v11.19.12
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2015', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 7.333 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:38510/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-30636/.s.monetdb.38510
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+
+# 10:50:37 >  
+# 10:50:37 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-30636" "--port=38510"
+# 10:50:37 >  
+
+#CREATE TABLE open_auctions (
+#        id int NOT NULL AUTO_INCREMENT,
+#        open_auction_id varchar(255) NOT NULL,
+#        initial double NOT NULL,
+#        reserve double NOT NULL,
+#        aktuell double NOT NULL,
+#        privacy varchar(255) NOT NULL,
+#        itemref varchar(255) NOT NULL,
+#        seller varchar(255) NOT NULL,
+#        quantity double NOT NULL,
+#        type varchar(255) NOT NULL,
+#        start varchar(255) NOT NULL,
+#        ende varchar(255) NOT NULL,
+#        PRIMARY KEY (id)
+#);
+#INSERT INTO "open_auctions" ("id", "open_auction_id", "initial", "reserve", 
"aktuell", "privacy", "itemref", "seller", "quantity", "type", "start", "ende") 
VALUES
+#(1, 'open_auction0', 210.62, 1540.75, 263.12, 'No', 'item0', 'person11', 1, 
'Regular', '02/27/1998', '03/09/1999'),
+#(2, 'open_auction1', 69.64, 398.65, 168.64, '', 'item2', 'person10', 1, 
'Featured', '06/14/1998', '02/27/1999'),
+#(3, 'open_auction2', 13.9, 0, 16.9, 'No', 'item3', 'person11', 1, 'Featured', 
'07/16/2000', '10/22/2000'),
+#(4, 'open_auction3', 17.12, 0, 179.12, '', 'item5', 'person13', 1, 
'Featured', '02/01/2001', '07/22/1999'),
+[ 12   ]
+#CREATE TABLE bidder (
+#        id int NOT NULL AUTO_INCREMENT,
+#        open_auction_id varchar(255) NOT NULL,
+#        date varchar(255) NOT NULL,
+#        time varchar(255) NOT NULL,
+#        personref varchar(255) NOT NULL,
+#        increase double NOT NULL,
+#        PRIMARY KEY (id)
+#);
+#INSERT INTO "bidder" ("id", "open_auction_id", "date", "time", "personref", 
"increase") VALUES
+#(1, 'open_auction0', '06/13/2001', '13:16:15', 'person0', 18),
+#(2, 'open_auction0', '09/18/2000', '11:29:44', 'person23', 12),
+#(3, 'open_auction0', '01/07/1998', '10:23:59', 'person14', 18),
+#(4, 'open_auction0', '07/10/2001', '14:00:39', 'person16', 4.5),
+#(5, 'open_auction1', '11/12/1998', '11:23:38', 'person20', 4.5),
+#(6, 'open_auction1', '10/02/2000', '22:48:00', 'person4', 15),
+#(7, 'open_auction1', '12/04/1998', '22:29:38', 'person23', 1.5),
+[ 60   ]
+#plan Select b.* FROM open_auctions o, bidder b WHERE (select b3.INCREASE from 
bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+% .plan # table_name
+% rel # name
+% clob # type
+% 366 # length
+project (
+| select (
+| | project (
+| | | select (
+| | | | group by (
+| | | | | join (
+| | | | | | table(sys.bidder) [ bidder.id NOT NULL as L6.id, 
bidder.open_auction_id NOT NULL as L6.open_auction_id ] COUNT ,
+| | | | | | project (
+| | | | | | | crossproduct (
+| | | | | | | | table(sys.bidder) [ bidder.id NOT NULL as L5.id, 
bidder.increase NOT NULL as L5.increase ] COUNT ,
+| | | | | | | | project (
+| | | | | | | | | select (
+| | | | | | | | | | group by (
+| | | | | | | | | | | join (
+| | | | | | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as 
b3a.id, bidder.open_auction_id NOT NULL as b3a.open_auction_id ] COUNT ,
+| | | | | | | | | | | | project (
+| | | | | | | | | | | | | crossproduct (
+| | | | | | | | | | | | | | project (
+| | | | | | | | | | | | | | | join (
+| | | | | | | | | | | | | | | | table(sys.open_auctions) [ open_auctions.id 
NOT NULL HASHCOL  as o.id, open_auctions.open_auction_id NOT NULL as 
o.open_auction_id ] COUNT ,
+| | | | | | | | | | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL 
 as b.id, bidder.open_auction_id NOT NULL as b.open_auction_id, bidder.date NOT 
NULL as b.date, bidder.time NOT NULL as b.time, bidder.personref NOT NULL as 
b.personref, bidder.increase NOT NULL as b.increase ] COUNT 
+| | | | | | | | | | | | | | | ) [ o.open_auction_id NOT NULL = 
b.open_auction_id NOT NULL ]
+| | | | | | | | | | | | | | ) [ o.id NOT NULL HASHCOL , o.open_auction_id NOT 
NULL, b.id NOT NULL HASHCOL , b.open_auction_id NOT NULL, b.date NOT NULL, 
b.time NOT NULL, b.personref NOT NULL, b.increase NOT NULL, sys.identity(o.id 
NOT NULL HASHCOL ) HASHCOL  as L10.L10 ],
+| | | | | | | | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as 
b3.id, bidder.increase NOT NULL as b3.increase ] COUNT 
+| | | | | | | | | | | | | ) [  ]
+| | | | | | | | | | | | ) [ L10.L10 HASHCOL , o.id NOT NULL HASHCOL , 
o.open_auction_id NOT NULL, b.id NOT NULL HASHCOL , b.open_auction_id NOT NULL, 
b.date NOT NULL, b.time NOT NULL, b.personref NOT NULL, b.increase NOT NULL, 
b3.id NOT NULL HASHCOL , b3.increase NOT NULL, sys.identity(o.id NOT NULL 
HASHCOL ) HASHCOL  as L7.L7 ]
+| | | | | | | | | | | ) [ b3a.open_auction_id NOT NULL = o.open_auction_id NOT 
NULL ]
+| | | | | | | | | | ) [ L10.L10, L7.L7 ] [ L10.L10 HASHCOL , o.id NOT NULL 
HASHCOL , o.open_auction_id NOT NULL, b.id NOT NULL HASHCOL , b.open_auction_id 
NOT NULL, b.date NOT NULL, b.time NOT NULL, b.personref NOT NULL, b.increase 
NOT NULL, b3.id NOT NULL HASHCOL , b3.increase NOT NULL, L7.L7 HASHCOL , 
sys.min no nil (b3a.id NOT NULL HASHCOL ) NOT NULL as L1.L1 ]
+| | | | | | | | | ) [ b3.id NOT NULL HASHCOL  = L1 NOT NULL ]
+| | | | | | | | ) [ o.id NOT NULL HASHCOL , o.open_auction_id NOT NULL, b.id 
NOT NULL HASHCOL , b.open_auction_id NOT NULL, b.date NOT NULL, b.time NOT 
NULL, b.personref NOT NULL, b.increase NOT NULL, b3.increase NOT NULL as L2.L2, 
sys.identity(o.id NOT NULL HASHCOL ) HASHCOL  as L12.L12 ]
+| | | | | | | ) [  ]
+| | | | | | ) [ L2.L2 NOT NULL, L12.L12 HASHCOL , o.id NOT NULL HASHCOL , 
o.open_auction_id NOT NULL, b.id NOT NULL HASHCOL , b.open_auction_id NOT NULL, 
b.date NOT NULL, b.time NOT NULL, b.personref NOT NULL, b.increase NOT NULL, 
L5.id NOT NULL, L5.increase NOT NULL, sys.identity(o.id NOT NULL HASHCOL ) 
HASHCOL  as L11.L11 ]
+| | | | | ) [ L6.open_auction_id NOT NULL = o.open_auction_id NOT NULL ]
+| | | | ) [ L12.L12, L11.L11 ] [ L2.L2 NOT NULL, L12.L12 HASHCOL , b.id NOT 
NULL HASHCOL , b.open_auction_id NOT NULL, b.date NOT NULL, b.time NOT NULL, 
b.personref NOT NULL, b.increase NOT NULL, L5.id NOT NULL, L5.increase NOT 
NULL, L11.L11 HASHCOL , sys.max no nil (L6.id NOT NULL HASHCOL  as b2a.id) NOT 
NULL as L3.L3 ]
+| | | ) [ L5.id NOT NULL = L3.L3 NOT NULL ]
+| | ) [ L2.L2 NOT NULL, L12.L12 HASHCOL , b.id NOT NULL HASHCOL , 
b.open_auction_id NOT NULL, b.date NOT NULL, b.time NOT NULL, b.personref NOT 
NULL, b.increase NOT NULL, L5.id NOT NULL, L5.increase NOT NULL, L11.L11 
HASHCOL , L3.L3 NOT NULL, sys.sql_mul(L2.L2 NOT NULL, double[tinyint "2"]) as 
L13.L13, L5.increase NOT NULL as L14.L14 ]
+| ) [ L13.L13 <= L14.L14 NOT NULL ]
+) [ b.id NOT NULL HASHCOL , b.open_auction_id NOT NULL, b.date NOT NULL, 
b.time NOT NULL, b.personref NOT NULL, b.increase NOT NULL ]
+#Select b.* FROM open_auctions o, bidder b WHERE (select b3.INCREASE from 
bidder b3 where b3.id = (select min (b3a.id) from bidder b3a where 
b3a.open_auction_id = o.open_auction_id)) * 2 <= (Select b2.INCREASE from 
bidder b2 where b2.id = (SELECT MAX (b2a.id) from bidder b2a where 
b2a.open_auction_id = o.open_auction_id)) AND o.open_auction_id = 
b.open_auction_id;
+% sys.b,       sys.b,  sys.b,  sys.b,  sys.b,  sys.b # table_name
+% id,  open_auction_id,        date,   time,   personref,      increase # name
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to