diff options
author | dan <dan@noemail.net> | 2019-08-30 19:45:03 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2019-08-30 19:45:03 +0000 |
commit | 9889ede28dd20ca1a2093a125cb38160eeb2c01a (patch) | |
tree | 90d1ef121b76d375149c7be61f98a59953990024 | |
parent | db3a32ed1cfb3b90cc5baa9df54e48afa9b18ee6 (diff) | |
download | sqlite-9889ede28dd20ca1a2093a125cb38160eeb2c01a.tar.gz sqlite-9889ede28dd20ca1a2093a125cb38160eeb2c01a.zip |
Add test case to window8.test. Also fix an error in a comment in window.c.
FossilOrigin-Name: 2925bfa5971c8557ecaa6ac18df0825ebbbd1622017509e83451d90640146fa8
-rw-r--r-- | manifest | 19 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/window.c | 4 | ||||
-rw-r--r-- | test/window8.tcl | 16 | ||||
-rw-r--r-- | test/window8.test | 17 |
5 files changed, 45 insertions, 13 deletions
@@ -1,5 +1,5 @@ -C Back\sout\sthe\schange\sat\s[47cd634c98b502d4]\swhich\swas\sincorrect.\s\sAdd\sa\stest\ncase\sso\sthat\swe\sdon't\saccidently\sback\sout\sthat\schange\sagain. -D 2019-08-30T18:02:49.143 +C Add\stest\scase\sto\swindow8.test.\sAlso\sfix\san\serror\sin\sa\scomment\sin\swindow.c. +D 2019-08-30T19:45:03.375 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -613,7 +613,7 @@ F src/where.c fb546afbdbedc77a6193a236db92f6f85bc8e17412ec596230dd8aee03a93716 F src/whereInt.h 4a296fd4fa79fdcbc2b5e8c1b898901617655811223e1082b899c23ecb092217 F src/wherecode.c 535c8e228478fd971b9a5b6cb6773995b0fbf7020d5989508a5094ce5b8cd95b F src/whereexpr.c 2757afbd5cfdbb420f9d0392e1bd5f5c0e33dee50a8c692befc7e502308e449f -F src/window.c 9f55b65411e1d37fa51b78afdeed16b73c73f1d97a052ee58c91c724a1b615d8 +F src/window.c 96b0c033d33408f16ac8b177eac6362ee53a23d9b6d7a51a04289ab2f956bb77 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 F test/affinity2.test b03930d288e38b07f55023a58538ad174605695e98934bdab1facf6bd9ecc436 F test/affinity3.test 6a101af2fc945ce2912f6fe54dd646018551710d @@ -1711,8 +1711,8 @@ F test/window5.test d328dd18221217c49c144181975eea17339eaeaf0e9aa558cee3afb84652 F test/window6.test f8d674254b23289cc17c84d79dec7eda7caa1dfb7836c43122cfdf3640d1df32 F test/window7.tcl 6a1210f05d40ec89c22960213a22cd3f98d4e2f2eb20646c83c8c30d4d76108f F test/window7.test 1d31276961ae7801edc72173edaf7593e3cbc79c06d1f1f09e20d8418af403cd -F test/window8.tcl 3b63931d608b6f00a9d26368207a7ffc9370c96e3e137ae2aff35284ade69d13 -F test/window8.test 4531204bfb5d833efbd8a5a1527c9871e62f8ae479386f42a7b55bdb5be39df3 +F test/window8.tcl 112bdc96dd310cfef93119fc5e4e9108c322080676fdb006ccc98d67d41c8acb +F test/window8.test 85ad3bd55615482c7a93f5286f0b0968f86ad0d62df5bca2f0ea50699e5aef31 F test/window9.test 20a6b590be718b6bc98a5356d4396d6cdf19329c547da084fa225b92d68e1693 F test/windowA.test 6d63dc1260daa17141a55007600581778523a8b420629f1282d2acfc36af23be F test/windowerr.tcl f5acd6fbc210d7b5546c0e879d157888455cd4a17a1d3f28f07c1c8a387019e0 @@ -1838,8 +1838,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 900464567b2a5ce0c278a3297e4be1968f609258608aa0fbe2fc67709aa22a4b -Q -47cd634c98b502d40a493455ba6d73cbd0dae74944f9cf06fcbcd025f4b49d6e -R 29d0b25ea3e14a5d62e6dc7f8a60e5a3 -U drh -Z 198db2b82ee9fb9cef5cc67ca7c92ad8 +P 596ac2a4eab28b74f4050fb4eb71883f2a1421fdbccf302413e4653391bb52c9 +R 94fb5a9c76dec8423f58b92f29509529 +U dan +Z c980e1f35bfd2a5c73fbb1e591fe4935 diff --git a/manifest.uuid b/manifest.uuid index aa386daac..a68d49dff 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -596ac2a4eab28b74f4050fb4eb71883f2a1421fdbccf302413e4653391bb52c9
\ No newline at end of file +2925bfa5971c8557ecaa6ac18df0825ebbbd1622017509e83451d90640146fa8
\ No newline at end of file diff --git a/src/window.c b/src/window.c index ad709bb03..7cb86e58b 100644 --- a/src/window.c +++ b/src/window.c @@ -1998,8 +1998,8 @@ static void windowCodeRangeTest( ** generated is equivalent to: ** ** if( reg1 IS NULL ){ - ** if( op==OP_Gt ) goto lbl; - ** if( op==OP_Ge && reg2 IS NOT NULL ) goto lbl; + ** if( op==OP_Ge ) goto lbl; + ** if( op==OP_Gt && reg2 IS NOT NULL ) goto lbl; ** if( op==OP_Le && reg2 IS NULL ) goto lbl; ** }else if( reg2 IS NULL ){ ** if( op==OP_Le ) goto lbl; diff --git a/test/window8.tcl b/test/window8.tcl index d881fd8e4..aa934a826 100644 --- a/test/window8.tcl +++ b/test/window8.tcl @@ -343,6 +343,22 @@ execsql_test 6.2 { ========== +execsql_test 7.0 { + DROP TABLE IF EXISTS t2; + CREATE TABLE t2(a INTEGER, b INTEGER); + + INSERT INTO t2 VALUES(1, 65); + INSERT INTO t2 VALUES(2, NULL); + INSERT INTO t2 VALUES(3, NULL); + INSERT INTO t2 VALUES(4, NULL); +} + +execsql_test 7.1 { + SELECT sum(a) OVER win FROM t2 + WINDOW win AS ( + ORDER BY b NULLS LAST RANGE BETWEEN 6 FOLLOWING AND UNBOUNDED FOLLOWING + ); +} finish_test diff --git a/test/window8.test b/test/window8.test index 53d3e3002..0c7656b9a 100644 --- a/test/window8.test +++ b/test/window8.test @@ -6205,4 +6205,21 @@ do_execsql_test 6.2 { #========================================================================== +do_execsql_test 7.0 { + DROP TABLE IF EXISTS t2; + CREATE TABLE t2(a INTEGER, b INTEGER); + + INSERT INTO t2 VALUES(1, 65); + INSERT INTO t2 VALUES(2, NULL); + INSERT INTO t2 VALUES(3, NULL); + INSERT INTO t2 VALUES(4, NULL); +} {} + +do_execsql_test 7.1 { + SELECT sum(a) OVER win FROM t2 + WINDOW win AS ( + ORDER BY b NULLS LAST RANGE BETWEEN 6 FOLLOWING AND UNBOUNDED FOLLOWING + ); +} {9 9 9 9} + finish_test |