Merge recent trunk fixes into the index-expr-opt branch.

FossilOrigin-Name: 6198ab4b871c464448ae303072bde0a810cac566a516cc29b1bf806fbd0a6c7b
This commit is contained in:
drh 2022-10-18 16:32:22 +00:00
commit 9489e0a5d7
4 changed files with 68 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Merge\strunk\sfixes\sinto\sthe\sindex-expr-opt\sbranch.
D 2022-10-18T11:28:33.210
C Merge\srecent\strunk\sfixes\sinto\sthe\sindex-expr-opt\sbranch.
D 2022-10-18T16:32:22.335
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -697,7 +697,7 @@ F src/vdbe.c 0c7cb1b934ad8611e14e7efaf2c3a95df7dd3f7964d63ea07fef42a23df86131
F src/vdbe.h 58675f47dcf3105bab182c3ad3726efd60ffd003e954386904ac9107d0d2b743
F src/vdbeInt.h 17b7461ffcf9ee760d1341731715a419f6b8c763089a7ece25c2e8098d702b3f
F src/vdbeapi.c 1e8713d0b653acb43cd1bdf579c40e005c4844ea90f414f065946a83db3c27fb
F src/vdbeaux.c fe4e8d270582d5eb7c4d44222b74584d8e47c5e6ba90849416115ce5eb47d5a4
F src/vdbeaux.c 6d0a75c1fbc7efea6924f6895ebceca664001464bc7ac56949d3c60aa5e498a0
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
F src/vdbemem.c 6cfed43758d57b6e3b99d9cdedfeccd86e45a07e427b22d8487cbdbebb6c522a
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
@ -1905,6 +1905,7 @@ F test/windowA.test 6d63dc1260daa17141a55007600581778523a8b420629f1282d2acfc36af
F test/windowB.test f2fb42b864b0cf431c956407583e9478a74c3642bdf8737fdcb6ff4a40298b07
F test/windowC.test 6fd75f5bb2f1343d34e470e36e68f0ff638d8a42f6aa7d99471261b31a0d42f2
F test/windowD.test 65cf5a765fb8072450e8a0de2979ce7f09a38d87724fe1280c6444073e3da49b
F test/windowE.test 6ba0c8048e4cc02b942e56640f8fcd50fd7ca72c876656c40f6baf42e316684c
F test/windowerr.tcl f5acd6fbc210d7b5546c0e879d157888455cd4a17a1d3f28f07c1c8a387019e0
F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3cc1819b
F test/windowfault.test 15094c1529424e62f798bc679e3fe9dfab6e8ba2f7dfe8c923b6248c31660a7c
@ -2035,8 +2036,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P a1485ce6c8374135290eb0a1e4eb4e225497ad7096847a4e2377c9c054946ca7 4fb77e96fa89a23a9365320c4190834edd6c09cfaf1ca30b34ce19b747ebbec0
R 06e54729ebe8b28a1f23ad9b3ac13bf6
P c7b9cc645b394a1b638a9a13ca83d321215aaa78d69ca70c6baa0ee692ed21bf 740a2eb0928d54fdf735a8e573c6a61a34dbd295b46e5b6ef39e957fd2623293
R f7f5f954c4cc82eef2f394d97ecd28bc
U drh
Z 583beba47cad975fdaa8bbe5cfc4a890
Z 298a7ba276579f138f35bb1c8d732eed
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
c7b9cc645b394a1b638a9a13ca83d321215aaa78d69ca70c6baa0ee692ed21bf
6198ab4b871c464448ae303072bde0a810cac566a516cc29b1bf806fbd0a6c7b

View File

@ -4585,7 +4585,7 @@ int sqlite3VdbeRecordCompareWithSkip(
serial_type = aKey1[idx1];
testcase( serial_type==12 );
if( serial_type>=10 ){
rc = +1;
rc = serial_type==10 ? -1 : +1;
}else if( serial_type==0 ){
rc = -1;
}else if( serial_type==7 ){
@ -4610,7 +4610,7 @@ int sqlite3VdbeRecordCompareWithSkip(
** numbers). Types 10 and 11 are currently "reserved for future
** use", so it doesn't really matter what the results of comparing
** them to numberic values are. */
rc = +1;
rc = serial_type==10 ? -1 : +1;
}else if( serial_type==0 ){
rc = -1;
}else{

58
test/windowE.test Normal file
View File

@ -0,0 +1,58 @@
# 2022 October 18
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix windowE
proc custom {a b} { return [string compare $a $b] }
db collate custom custom
do_execsql_test 1.0 {
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT COLLATE custom);
INSERT INTO t1 VALUES(1, 'one');
INSERT INTO t1 VALUES(2, 'two');
INSERT INTO t1 VALUES(3, 'three');
INSERT INTO t1 VALUES(4, 'four');
INSERT INTO t1 VALUES(5, 'five');
INSERT INTO t1 VALUES(6, 'six');
CREATE INDEX t1b ON t1(b);
}
do_execsql_test 1.1 {
SELECT * FROM t1
} {
1 one 2 two 3 three 4 four 5 five 6 six
}
do_execsql_test 1.2 {
SELECT group_concat(a,',') OVER win FROM t1
WINDOW win AS (
ORDER BY b RANGE BETWEEN 1 PRECEDING AND 2 PRECEDING
)
} {
5 4 1 6 3 2
}
proc custom {a b} { return [string compare $b $a] }
do_execsql_test 1.3 {
SELECT group_concat(a,',') OVER win FROM t1
WINDOW win AS (
ORDER BY b RANGE BETWEEN 1 PRECEDING AND 2 PRECEDING
)
} {
5 5,4 5,4,1 5,4,1,6 5,4,1,6,3 5,4,1,6,3,2
}
finish_test