1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Further tests for the push-down optimization with window functions.

FossilOrigin-Name: 4b089f70117bfb440eaefd830c05576be0cc624d9d6018c869270dc68e44513e
This commit is contained in:
dan
2021-02-23 15:36:06 +00:00
parent 903fdd4834
commit 34a224a13b
4 changed files with 94 additions and 13 deletions

View File

@@ -246,6 +246,7 @@ do_faultsim_test 10 -faults oom* -prep {
faultsim_test_result {0 {}}
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 11.0 {
DROP TABLE IF EXISTS t0;
@@ -253,7 +254,7 @@ do_execsql_test 11.0 {
INSERT INTO t0 VALUES(0);
} {}
do_faultsim_test 11 -faults oom* -prep {
do_faultsim_test 11.1 -faults oom* -prep {
} -body {
execsql {
SELECT * FROM t0 WHERE
@@ -263,7 +264,7 @@ do_faultsim_test 11 -faults oom* -prep {
faultsim_test_result {0 {}}
}
do_faultsim_test 11 -faults oom* -prep {
do_faultsim_test 11.2 -faults oom* -prep {
} -body {
execsql {
VALUES(false),(current_date collate binary)
@@ -274,4 +275,21 @@ do_faultsim_test 11 -faults oom* -prep {
faultsim_test_result {0 {}}
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 12.0 {
CREATE TABLE t1(a, b, c);
} {}
do_faultsim_test 12 -faults oom* -prep {
} -body {
execsql {
WITH v(a, b, row_number) AS (
SELECT a, b, row_number() OVER (PARTITION BY a ORDER BY b) FROM t1
)
SELECT * FROM v WHERE a=2
}
} -test {
faultsim_test_result {0 {}}
}
finish_test