Changeset: ed98f4df49d1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed98f4df49d1
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
        sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128
        sql/benchmarks/tpch/LOCKED/Tests/02.stable.out
        sql/benchmarks/tpch/Tests/01-22.stable.out
        sql/benchmarks/tpch/Tests/01-22.stable.out.int128
        sql/benchmarks/tpch/Tests/02.stable.out
        sql/server/rel_optimizer.c
        sql/server/rel_rel.c
        sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
        sql/test/BugTracker-2016/Tests/storagemodel.stable.out
        sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
        sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out
        
sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out.int128
        sql/test/leaks/Tests/check1.stable.out.int128
Branch: Dec2016
Log Message:

fixed bug 6257, ie pas proper column when rewriting the LOJ apply down a 
groupby with
a count(*).
fixed crash caused by a wrong function lookup.


diffs (truncated from 52245 to 300 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -214,7 +214,7 @@ handle_in_exps( mvc *sql, sql_exp *ce, l
                sql_subtype *bt = sql_bind_localtype("bit");
                sql_subfunc *cmp = (in)
                        ?sql_bind_func(sql->sa, sql->session->schema, "=", 
tail_type(c), tail_type(c), F_FUNC)
-                       :sql_bind_func(sql->sa, sql->session->schema, "!=", 
tail_type(c), tail_type(c), F_FUNC);
+                       :sql_bind_func(sql->sa, sql->session->schema, "<>", 
tail_type(c), tail_type(c), F_FUNC);
                sql_subfunc *a = (in)?sql_bind_func(sql->sa, 
sql->session->schema, "or", bt, bt, F_FUNC)
                                     :sql_bind_func(sql->sa, 
sql->session->schema, "and", bt, bt, F_FUNC);
 
diff --git a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out 
b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
--- a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
+++ b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out
@@ -81,7 +81,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 11:48:05 >  
 # 11:48:05 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=35781
diff --git a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128 
b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128
--- a/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128
+++ b/sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128
@@ -81,7 +81,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 11:48:05 >  
 # 11:48:05 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=35781
diff --git a/sql/benchmarks/tpch/LOCKED/Tests/02.stable.out 
b/sql/benchmarks/tpch/LOCKED/Tests/02.stable.out
--- a/sql/benchmarks/tpch/LOCKED/Tests/02.stable.out
+++ b/sql/benchmarks/tpch/LOCKED/Tests/02.stable.out
@@ -37,7 +37,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 09:17:12 >  
 # 09:17:12 >  Done.
diff --git a/sql/benchmarks/tpch/Tests/01-22.stable.out 
b/sql/benchmarks/tpch/Tests/01-22.stable.out
--- a/sql/benchmarks/tpch/Tests/01-22.stable.out
+++ b/sql/benchmarks/tpch/Tests/01-22.stable.out
@@ -81,7 +81,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 11:48:05 >  
 # 11:48:05 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=35781
diff --git a/sql/benchmarks/tpch/Tests/01-22.stable.out.int128 
b/sql/benchmarks/tpch/Tests/01-22.stable.out.int128
--- a/sql/benchmarks/tpch/Tests/01-22.stable.out.int128
+++ b/sql/benchmarks/tpch/Tests/01-22.stable.out.int128
@@ -81,7 +81,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 11:48:05 >  
 # 11:48:05 >  Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb 
--host=localhost --port=35781
diff --git a/sql/benchmarks/tpch/Tests/02.stable.out 
b/sql/benchmarks/tpch/Tests/02.stable.out
--- a/sql/benchmarks/tpch/Tests/02.stable.out
+++ b/sql/benchmarks/tpch/Tests/02.stable.out
@@ -37,7 +37,7 @@ Ready.
 % rewrite,     count # name
 % clob,        int # type
 % 7,   1 # length
-[ "joinidx",   7       ]
+[ "joinidx",   4       ]
 
 # 09:17:12 >  
 # 09:17:12 >  Done.
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
@@ -3616,6 +3616,8 @@ rel_push_aggr_down(int *changes, mvc *sq
                                set_has_nil(e);
                                e = exp_column(sql->sa, exp_find_rel_name(e), 
exp_name(e), exp_subtype(e), e->card, has_nil(e), is_intern(e));
                                ne = exp_aggr1(sql->sa, e, a, need_distinct(e), 
1, e->card, 1);
+                               if (cnt)
+                                       ne->p = prop_create(sql->sa, 
PROP_COUNT, ne->p);
                        } else {
                                ne = exp_copy(sql->sa, oa);
                        }
@@ -8472,11 +8474,6 @@ rel_apply_rewrite(int *changes, mvc *sql
                        sql_rel *nl = rel_apply(sql, rel_dup(rel->l), 
rel_dup(r->l), rel->exps, rel->flag);
                        sql_rel *rr = rel_dup(r->r);
 
-                       if (0 && rr->subquery) {
-                               rr->subquery = 0;
-                               rr = rel_project(sql->sa, rr, 
rel_projections(sql, rr, NULL, 1, 2));
-                               rr->subquery = 1;
-                       }
                        nl = rel_crossproduct(sql->sa, nl, rr, r->op);
                        nl->exps = exps_copy(sql->sa, r->exps);
                        rel_destroy(rel);
@@ -8485,11 +8482,6 @@ rel_apply_rewrite(int *changes, mvc *sql
                        sql_rel *nr = rel_apply(sql, rel_dup(rel->l), 
rel_dup(r->r), rel->exps, rel->flag);
                        sql_rel *rl = rel_dup(r->l);
 
-                       if (0 && rl->subquery) {
-                               rl->subquery = 0;
-                               rl = rel_project(sql->sa, rl, 
rel_projections(sql, rl, NULL, 1, 2));
-                               rl->subquery = 1;
-                       }
                        nr = rel_crossproduct(sql->sa, rl, nr, r->op);
                        nr->exps = exps_copy(sql->sa, r->exps);
                        rel_destroy(rel);
@@ -8513,16 +8505,18 @@ rel_apply_rewrite(int *changes, mvc *sql
                int has_gbe = (ogbe && list_length(ogbe) > 0);
 
                node *n;
-               list *gbe = new_exp_list(sql->sa), *exps;
-               sql_exp *ident;
+               list *gbe = new_exp_list(sql->sa);//, *exps;
+               sql_exp *ident, *r_ident;
 
                /* add project + identity around l */
                l = rel_add_identity(sql, rel_dup(l), &ident);
                ident = exp_column(sql->sa, exp_relname(ident), 
exp_name(ident), exp_subtype(ident), ident->card, has_nil(ident), 
is_intern(ident));
                list_append(gbe, ident);
+               r->l = rel_add_identity(sql, rel_dup(r->l), &r_ident);
+               r_ident = exp_column(sql->sa, exp_relname(r_ident), 
exp_name(r_ident), exp_subtype(r_ident), r_ident->card, has_nil(r_ident), 
is_intern(r_ident));
 
                aggr = rel_projections(sql, l, NULL, 1, 1); /* columns of R */
-               exps = rel_projections(sql, r->l, NULL, 1, 1); /* columns 
before groupgby */
+               //exps = rel_projections(sql, r->l, NULL, 1, 2); /* columns 
before groupgby */
 
                if (has_gbe)
                        list_merge(gbe, ogbe, (fdup)NULL);
@@ -8531,12 +8525,13 @@ rel_apply_rewrite(int *changes, mvc *sql
 
                        /* count_nil(*) -> count(col) */
                        if (!has_gbe && e->type == e_aggr && 
strcmp(((sql_subaggr *)e->f)->aggr->base.name, "count") == 0 && !e->l) {
-                               sql_exp *c = exps->t->data;
+                               //sql_exp *c = exps->t->data;
+                               sql_exp *c = r_ident;
                                list *l = new_exp_list(sql->sa);
 
                                set_no_nil(e);
                                e->l = l;
-                               c = exp_column(sql->sa, exp_relname(c), 
exp_name(c), exp_subtype(c), exp_card(c), has_nil(c), is_intern(c));
+                               //c = exp_column(sql->sa, exp_relname(c), 
exp_name(c), exp_subtype(c), exp_card(c), has_nil(c), is_intern(c));
                                append(l, c);
                        }
                        if (e->type == e_aggr && e->card < CARD_AGGR) /* also 
fix projects, see above */
diff --git a/sql/server/rel_rel.c b/sql/server/rel_rel.c
--- a/sql/server/rel_rel.c
+++ b/sql/server/rel_rel.c
@@ -755,9 +755,9 @@ list *
 rel_projections(mvc *sql, sql_rel *rel, const char *tname, int settname, int 
intern )
 {
        list *lexps, *rexps, *exps;
-       int intern_only = (intern==2)?1:0;
+       int include_subquery = (intern==2)?1:0;
 
-       if (!rel || (is_subquery(rel) /*&& is_project(rel->op)*/ && rel->op == 
op_project))
+       if (!rel || (!include_subquery && is_subquery(rel) && rel->op == 
op_project))
                return new_exp_list(sql->sa);
 
        switch(rel->op) {
@@ -792,8 +792,6 @@ rel_projections(mvc *sql, sql_rel *rel, 
                        for (en = rel->exps->h; en; en = en->next) {
                                sql_exp *e = en->data;
                                if (intern || !is_intern(e)) {
-                                       if (!is_intern(e) && intern_only && 
(exp_name(e)[0] != '%' && exp_name(e)[0] != 'L' && exp_relname(e)[0] != 'L')) 
-                                               continue;
                                        append(exps, e = exp_alias_or_copy(sql, 
tname, exp_name(e), rel, e));
                                        if (!settname) /* noname use alias */
                                                exp_setrelname(sql->sa, e, 
label);
diff --git a/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out 
b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
--- a/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
+++ b/sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out
@@ -68,46 +68,58 @@ Ready.
 % .plan # table_name
 % rel # name
 % clob # type
-% 374 # length
+% 376 # length
+REF 1 (2)
+table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b3.id, bidder.increase NOT 
NULL as b3.increase ] COUNT 
+REF 2 (3)
+table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b3a.id, 
bidder.open_auction_id NOT NULL as b3a.open_auction_id ] COUNT 
+REF 3 (2)
+table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b2.id, bidder.increase NOT 
NULL as b2.increase, bidder.%TID% NOT NULL as L33.%TID%, bidder.%bidder_id_pkey 
NOT NULL HASHIDX  as L34.%bidder_id_pkey ] COUNT 
+REF 4 (3)
+table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b2a.id, 
bidder.open_auction_id NOT NULL as b2a.open_auction_id, bidder.%TID% NOT NULL 
as L33.%TID%, bidder.%bidder_id_pkey NOT NULL HASHIDX  as L34.%bidder_id_pkey ] 
COUNT 
 project (
 | select (
 | | project (
 | | | select (
 | | | | group by (
-| | | | | join (
-| | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b2a.id, 
bidder.open_auction_id NOT NULL as b2a.open_auction_id, bidder.%TID% NOT NULL 
as L33.%TID%, bidder.%bidder_id_pkey NOT NULL HASHIDX  as L34.%bidder_id_pkey ] 
COUNT ,
-| | | | | | project (
-| | | | | | | crossproduct (
-| | | | | | | | project (
+| | | | | project (
+| | | | | | join (
+| | | | | | | & REF 4 ,
+| | | | | | | project (
+| | | | | | | | crossproduct (
 | | | | | | | | | project (
-| | | | | | | | | | select (
-| | | | | | | | | | | group by (
-| | | | | | | | | | | | join (
+| | | | | | | | | | project (
+| | | | | | | | | | | select (
+| | | | | | | | | | | | group by (
 | | | | | | | | | | | | | project (
-| | | | | | | | | | | | | | crossproduct (
+| | | | | | | | | | | | | | join (
 | | | | | | | | | | | | | | | 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  as L57.L57 ],
-| | | | | | | | | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  
as b3.id, bidder.increase NOT NULL as b3.increase ] COUNT 
-| | | | | | | | | | | | | | ) [  ]
-| | | | | | | | | | | | | ) [ L57.L57 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  as L43.L43 ],
-| | | | | | | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as 
b3a.id, bidder.open_auction_id NOT NULL as b3a.open_auction_id ] COUNT 
-| | | | | | | | | | | | ) [ b3a.open_auction_id NOT NULL = o.open_auction_id 
NOT NULL ]
-| | | | | | | | | | | ) [ L43.L43, L57.L57 ] [ L57.L57 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, L43.L43 HASHCOL , 
sys.min no nil (b3a.id NOT NULL HASHCOL ) NOT NULL as L10.L10 ]
-| | | | | | | | | | ) [ b3.id NOT NULL HASHCOL  = L10 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 
L13.L13 ]
-| | | | | | | | ) [ 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, L13.L13 NOT NULL, 
sys.identity(o.id NOT NULL) HASHCOL  as L102.L102 ],
-| | | | | | | | table(sys.bidder) [ bidder.id NOT NULL HASHCOL  as b2.id, 
bidder.increase NOT NULL as b2.increase, bidder.%TID% NOT NULL as L33.%TID%, 
bidder.%bidder_id_pkey NOT NULL HASHIDX  as L34.%bidder_id_pkey ] COUNT 
-| | | | | | | ) [  ]
-| | | | | | ) [ L102.L102 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, L13.L13 NOT NULL, 
b2.id NOT NULL HASHCOL , b2.increase NOT NULL, sys.identity(o.id NOT NULL) 
HASHCOL  as L72.L72 ]
-| | | | | ) [ b2a.open_auction_id NOT NULL = o.open_auction_id NOT NULL ]
-| | | | ) [ L72.L72, L102.L102 ] [ L102.L102 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, L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , 
b2.increase NOT NULL, L72.L72 HASHCOL , sys.max no nil (b2a.id NOT NULL HASHCOL 
) NOT NULL as L24.L24 ]
+| | | | | | | | | | | | | | | | 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  as L63.L63 ],
+| | | | | | | | | | | | | | | | | & REF 1  
+| | | | | | | | | | | | | | | | ) [  ]
+| | | | | | | | | | | | | | | ) [ L63.L63 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  as L43.L43 ],
+| | | | | | | | | | | | | | | & REF 2  
+| | | | | | | | | | | | | | ) [ b3a.open_auction_id NOT NULL = 
o.open_auction_id NOT NULL ]
+| | | | | | | | | | | | | ) [ L63.L63 HASHCOL , L43.L43 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, 
b3a.id NOT NULL HASHCOL  ]
+| | | | | | | | | | | | ) [ L43.L43, L63.L63 ] [ L63.L63 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, 
L43.L43 HASHCOL , sys.min no nil (b3a.id NOT NULL HASHCOL ) NOT NULL as L10.L10 
]
+| | | | | | | | | | | ) [ b3.id NOT NULL HASHCOL  = L10 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 
L13.L13 ]
+| | | | | | | | | ) [ 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, L13.L13 NOT NULL, 
sys.identity(o.id NOT NULL) HASHCOL  as L111.L111 ],
+| | | | | | | | | & REF 3  
+| | | | | | | | ) [  ]
+| | | | | | | ) [ L111.L111 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, 
L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , b2.increase NOT NULL, 
sys.identity(o.id NOT NULL) HASHCOL  as L75.L75 ]
+| | | | | | ) [ b2a.open_auction_id NOT NULL = o.open_auction_id NOT NULL ]
+| | | | | ) [ L111.L111 HASHCOL , L75.L75 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, L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , 
b2.increase NOT NULL, b2a.id NOT NULL HASHCOL  ]
+| | | | ) [ L75.L75, L111.L111 ] [ L111.L111 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, L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , 
b2.increase NOT NULL, L75.L75 HASHCOL , sys.max no nil (b2a.id NOT NULL HASHCOL 
) NOT NULL as L24.L24 ]
 | | | ) [ b2.id NOT NULL HASHCOL  = L24.L24 NOT NULL ]
-| | ) [ L102.L102 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, L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , b2.increase NOT NULL, L72.L72 
HASHCOL , L24.L24 NOT NULL, sys.sql_mul(L13.L13 NOT NULL, double "2.000000") as 
L111.L111, b2.increase NOT NULL as L112.L112 ]
-| ) [ L111.L111 <= L112.L112 NOT NULL ]
+| | ) [ L111.L111 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, L13.L13 NOT NULL, b2.id NOT NULL HASHCOL , b2.increase NOT NULL, L75.L75 
HASHCOL , L24.L24 NOT NULL, sys.sql_mul(L13.L13 NOT NULL, double "2.000000") as 
L117.L117, b2.increase NOT NULL as L120.L120 ]
+| ) [ L117.L117 <= L120.L120 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
diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out 
b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
--- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
+++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
@@ -100,7 +100,7 @@ Ready.
 [ "sys",       "_tables",      "name", "varchar",      "writable",     8,      
0,      false,  0,      false   ]
 [ "sys",       "_tables",      "schema_id",    "int",  "writable",     4,      
0,      false,  0,      NULL    ]
 [ "sys",       "_tables",      "query",        "varchar",      "writable",     
45,     0,      false,  0,      NULL    ]
-[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      false   ]
 [ "sys",       "_tables",      "system",       "boolean",      "writable",     
1,      0,      false,  0,      NULL    ]
 [ "sys",       "_tables",      "commit_action",        "smallint",     
"writable",     2,      0,      false,  0,      NULL    ]
 [ "sys",       "_tables",      "access",       "smallint",     "writable",     
2,      0,      false,  0,      true    ]
diff --git a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out 
b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
--- a/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
+++ b/sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
@@ -38,7 +38,7 @@ Ready.
 | | | | | ) [ _tables.id as tables.id ]                              |
 | | | | ) [  ] [ sys.count() NOT NULL as L41.L41 ]                   |
 | | | ) [ L41.L41 ]                                                  |
-| | ) [  ] [ sys.sum no nil (L41.L41) as L41.L41 ]                   |
+| | ) [  ] [ sys.sum no nil (L41.L41) COUNT  as L41.L41 ]            |
 | ) [ L41 NOT NULL as L42.L41 ]                                      |
 +--------------------------------------------------------------------+
 18 rows
@@ -74,28 +74,28 @@ Operation successful
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to