Changeset: 686c3cc7e6f1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/686c3cc7e6f1 Modified Files: sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test sql/test/BugTracker-2023/Tests/union-query-7401.test sql/test/prepare/Tests/limit_in_prepare.Bug-2552.sql sql/test/prepare/Tests/limit_in_prepare.Bug-2552.stable.out sql/test/rel-optimizers/optimize-proj/Tests/groupby-cse.test Branch: Jun2023 Log Message:
Don't assume query results will be in certain order Added ORDER BY or rowsort to make the query results deterministic/comparable. Some queries in LIMIT_OFFSET_big-endian.Bug-2622.test become redundant after adding ORDER BY, so they are removed. diffs (134 lines): diff --git a/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test b/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test --- a/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test +++ b/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test @@ -343,29 +343,6 @@ 3 4 query I rowsort - select * from oblo OFFSET 2 ----- -1 -2 - -query I rowsort - select * from oblo LIMIT 2 ----- -3 -4 - -query I rowsort - select * from oblo LIMIT 1 OFFSET 2 ----- -2 - -query I rowsort - select * from oblo LIMIT 2 OFFSET 1 ----- -2 -3 - -query I rowsort select * from oblo ORDER BY a ---- 1 diff --git a/sql/test/BugTracker-2023/Tests/union-query-7401.test b/sql/test/BugTracker-2023/Tests/union-query-7401.test --- a/sql/test/BugTracker-2023/Tests/union-query-7401.test +++ b/sql/test/BugTracker-2023/Tests/union-query-7401.test @@ -7,7 +7,7 @@ insert into t7401 values (1,10) statement ok insert into t7401 values (2,20) -query II nosort +query II rowsort select b as a, a as b from t7401 ---- 10 @@ -15,7 +15,7 @@ 1 20 2 -query II nosort +query II rowsort select a as a, b as b from t7401 UNION select b as a, a as b from t7401 @@ -29,7 +29,7 @@ 1 20 2 -query II nosort +query II rowsort select a as a, b as b from t7401 UNION ALL select b as a, a as b from t7401 diff --git a/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.sql b/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.sql --- a/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.sql +++ b/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.sql @@ -1,5 +1,5 @@ CREATE TABLE "sys"."tbls" ( - "id" INTEGER, + "id" INTEGER PRIMARY KEY, "name" VARCHAR(1024), "schema_id" INTEGER, "query" VARCHAR(2048), @@ -52,12 +52,12 @@ 6453 "statistics" 2000 NULL 0 true 0 fal create table rr (id int); insert into rr values (1),(2),(3); -prepare select * from rr limit ?; +prepare select * from rr order by id limit ?; exec ** (1); drop table rr; -prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tbls limit 24; +prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tbls order by id limit 24; exec ** (); drop table tbls; diff --git a/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.stable.out b/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.stable.out --- a/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.stable.out +++ b/sql/test/prepare/Tests/limit_in_prepare.Bug-2552.stable.out @@ -10,7 +10,7 @@ stdout of test 'limit_in_prepare.Bug-255 # 22:28:06 > #CREATE TABLE "sys"."tbls" ( -# "id" INTEGER, +# "id" INTEGER PRIMARY KEY, # "name" VARCHAR(1024), # "schema_id" INTEGER, # "query" VARCHAR(2048), @@ -36,8 +36,8 @@ stdout of test 'limit_in_prepare.Bug-255 #create table rr (id int); #insert into rr values (1),(2),(3); [ 3 ] -#prepare select * from rr limit ?; -#prepare select * from rr limit ?; +#prepare select * from rr order by id limit ?; +#prepare select * from rr order by id limit ?; % .prepare, .prepare, .prepare, .prepare, .prepare, .prepare # table_name % type, digits, scale, schema, table, column # name % varchar, int, int, varchar, varchar, varchar # type @@ -51,8 +51,8 @@ stdout of test 'limit_in_prepare.Bug-255 % 1 # length [ 1 ] #drop table rr; -#prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tables limit 24; -#prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tables limit 24; +#prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tables order by id limit 24; +#prepare select name, schema_id, query, type, system, commit_action, readonly, temporary from tables order by id limit 24; % .prepare, .prepare, .prepare, .prepare, .prepare, .prepare # table_name % type, digits, scale, schema, table, column # name % varchar, int, int, varchar, varchar, varchar # type diff --git a/sql/test/rel-optimizers/optimize-proj/Tests/groupby-cse.test b/sql/test/rel-optimizers/optimize-proj/Tests/groupby-cse.test --- a/sql/test/rel-optimizers/optimize-proj/Tests/groupby-cse.test +++ b/sql/test/rel-optimizers/optimize-proj/Tests/groupby-cse.test @@ -45,7 +45,7 @@ project ( | ) [ "foo"."c1" ] [ "foo"."c1", "sys"."count" no nil ("foo"."c3") NOT NULL as "%1"."%1" ] ) [ "foo"."c1" UNIQUE, "foo"."c1" UNIQUE, "%1"."%1" NOT NULL ] -query III nosort gb-over-bt +query III rowsort SELECT c1, c1, _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org