Merge all recent changes from trunk,
including the fix for the OP_SCopy-vs-OP_Copy problem. FossilOrigin-Name: 9515c8344a6743bbb0c6a6e49fb79fb3139090df
This commit is contained in:
+3
-8
@@ -47,12 +47,12 @@ do_test 1.2 {
|
||||
catchsql {
|
||||
SELECT c FROM t1 WHERE a>'abc';
|
||||
}
|
||||
} {0 {}}
|
||||
} {1 {database disk image is malformed}}
|
||||
do_test 1.3 {
|
||||
catchsql {
|
||||
PRAGMA integrity_check
|
||||
}
|
||||
} {0 ok}
|
||||
} {1 {database disk image is malformed}}
|
||||
do_test 1.4 {
|
||||
catchsql {
|
||||
SELECT c FROM t1 ORDER BY a;
|
||||
@@ -71,11 +71,6 @@ do_test 2.1 {
|
||||
catchsql {
|
||||
SELECT rowid FROM t1 WHERE a='abc' and b='xyz123456789XYZ';
|
||||
}
|
||||
# The following test result is brittle. The point above is to try to
|
||||
# force a buffer overread by a corrupt database file. If we get an
|
||||
# incorrect answer from a corrupt database file, that is OK. If the
|
||||
# result below changes, that just means that "undefined behavior" has
|
||||
# changed.
|
||||
} {/0 .*/}
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
finish_test
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ do_test 1.3 {
|
||||
hexio_write test.db $off FFFF7f02
|
||||
sqlite3 db test.db
|
||||
catchsql { SELECT * FROM t1 WHERE a = 10 }
|
||||
} {0 {}}
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_test 2.0 {
|
||||
execsql {
|
||||
|
||||
+5
-1
@@ -19,6 +19,11 @@ set testprefix wal64k
|
||||
|
||||
ifcapable !wal {finish_test ; return }
|
||||
|
||||
if {$tcl_platform(platform) != "unix"} {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
db close
|
||||
test_syscall pagesize 65536
|
||||
sqlite3 db test.db
|
||||
@@ -44,4 +49,3 @@ integrity_check 1.3
|
||||
db close
|
||||
test_syscall pagesize -1
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -166,5 +166,18 @@ do_eqp_test whereG-3.4 {
|
||||
SELECT * FROM a, b WHERE a2=5 AND a1=b1;
|
||||
} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
|
||||
|
||||
# Ticket [1e64dd782a126f48d78c43a664844a41d0e6334e]:
|
||||
# Incorrect result in a nested GROUP BY/DISTINCT due to the use of an OP_SCopy
|
||||
# where an OP_Copy was needed.
|
||||
#
|
||||
do_execsql_test whereG-4.0 {
|
||||
CREATE TABLE t4(x);
|
||||
INSERT INTO t4 VALUES('right'),('wrong');
|
||||
SELECT DISTINCT x
|
||||
FROM (SELECT x FROM t4 GROUP BY x)
|
||||
WHERE x='right'
|
||||
ORDER BY x;
|
||||
} {right}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user