Changeset: acb1485746ad for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/acb1485746ad
Modified Files:
        gdk/gdk_bbp.c
        monetdb5/optimizer/opt_pushselect.c
        sql/test/prepare/Tests/sqlancer_prepare.sql
        sql/test/prepare/Tests/sqlancer_prepare.stable.out
        sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
Branch: Jan2022
Log Message:

merged with jul2021


diffs (66 lines):

diff --git a/monetdb5/optimizer/opt_pushselect.c 
b/monetdb5/optimizer/opt_pushselect.c
--- a/monetdb5/optimizer/opt_pushselect.c
+++ b/monetdb5/optimizer/opt_pushselect.c
@@ -886,7 +886,11 @@ OPTpushselectImplementation(Client cntxt
                                getArg(u, 3) = getArg(q,2); /* update ids */
                                //getArg(u, 4) = getArg(s,0);
                                p = pushArgument(mb, u, getArg(s,0)); /* push 
at end */
+                               /* make sure to resolve again */
+                               u->token = ASSIGNsymbol;
                                u->typechk = TYPE_UNKNOWN;
+                       u->fcn = NULL;
+                       u->blk = NULL;
                                pushInstruction(mb,u);
                                oclean[i] = 1;
                                continue;
diff --git a/sql/test/prepare/Tests/sqlancer_prepare.sql 
b/sql/test/prepare/Tests/sqlancer_prepare.sql
--- a/sql/test/prepare/Tests/sqlancer_prepare.sql
+++ b/sql/test/prepare/Tests/sqlancer_prepare.sql
@@ -83,3 +83,11 @@ ROLLBACK;
 PREPARE WITH y(a,b) AS (SELECT 1, ?) SELECT "json"."filter"(JSON '"a"', y.b) 
FROM y CROSS JOIN ((SELECT 1, 4) EXCEPT (SELECT 1,2)) x(x,y);
 
 PREPARE WITH y(a,b) AS (SELECT 1, ?) SELECT "json"."filter"(JSON '"a"', y.b) 
FROM ((SELECT 1, 4) EXCEPT (SELECT 1,2)) x(x,y) CROSS JOIN y;
+
+START TRANSACTION;
+create table deleteall (i integer, j integer);
+insert into deleteall (select a,a as b from generate_series(cast(1 as 
integer),10000) as a(a));
+set optimizer='sequential_pipe';
+prepare select count(*) from deleteall where j in 
(2001,2007,2016,2028,2037,2047,2053,2059,2063,2067,2076,2087,2094,2099,2110,2115,2124,2135,2142,2147);
+EXEC **();
+ROLLBACK;
diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out 
b/sql/test/prepare/Tests/sqlancer_prepare.stable.out
--- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out
+++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out
@@ -170,3 +170,14 @@
 % 4,   1,      1,      0,      3,      3 # length
 [ "json",      0,      0,      "",     "%15",  "%15"   ]
 [ "clob",      0,      0,      NULL,   NULL,   NULL    ]
+[ 9999 ]
+% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
+% type,        digits, scale,  schema, table,  column # name
+% varchar,     int,    int,    str,    str,    str # type
+% 6,   2,      1,      0,      2,      2 # length
+[ "bigint",    64,     0,      "",     "%2",   "%2"    ]
+% .%2 # table_name
+% %2 # name
+% bigint # type
+% 2 # length
+[ 20   ]
diff --git a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 
b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
--- a/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
+++ b/sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128
@@ -161,3 +161,14 @@
 % 4,   1,      1,      0,      3,      3 # length
 [ "json",      0,      0,      "",     "%15",  "%15"   ]
 [ "clob",      0,      0,      NULL,   NULL,   NULL    ]
+[ 9999 ]
+% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
+% type,        digits, scale,  schema, table,  column # name
+% varchar,     int,    int,    str,    str,    str # type
+% 6,   2,      1,      0,      2,      2 # length
+[ "bigint",    64,     0,      "",     "%2",   "%2"    ]
+% .%2 # table_name
+% %2 # name
+% bigint # type
+% 2 # length
+[ 20   ]
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to