47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
Index: test/fts3corrupt4.test
|
||
|
==================================================================
|
||
|
--- test/fts3corrupt4.test
|
||
|
+++ test/fts3corrupt4.test
|
||
|
@@ -4401,14 +4401,36 @@
|
||
|
do_catchsql_test 25.5 {
|
||
|
WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE x<599237)
|
||
|
INSERT INTO t1( a ) SELECT randomblob(3000) FROM t2 ;
|
||
|
} {0 {}}
|
||
|
|
||
|
-do_catchsql_test 25.6 {
|
||
|
- INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
- INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
-} {1 {database disk image is malformed}}
|
||
|
+if {$tcl_platform(byteOrder)=="littleEndian"} {
|
||
|
+ # The SQLITE_CORRUPT error depends on the specific random byte
|
||
|
+ # sequence generated by SQLite's PRNG. But the SQLite PRNG
|
||
|
+ # uses ChaCha20, which generates a different byte sequence on
|
||
|
+ # big-endian and little-endian platforms. The SQLITE_CORRUPT
|
||
|
+ # error only comes up when the pseudo-random byte sequence is
|
||
|
+ # the one generated on little-endian platforms.
|
||
|
+ #
|
||
|
+ # See Forum thread:
|
||
|
+ # https://sqlite.org/forum/forumpost/b5f89d813babfd88
|
||
|
+ #
|
||
|
+ do_catchsql_test 25.6a {
|
||
|
+ INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
+ } {1 {database disk image is malformed}}
|
||
|
+ do_catchsql_test 25.6b {
|
||
|
+ INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
+ } {1 {database disk image is malformed}}
|
||
|
+} else {
|
||
|
+ do_catchsql_test 25.6a {
|
||
|
+ INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
+ } {0 {}}
|
||
|
+ do_catchsql_test 25.6b {
|
||
|
+ INSERT INTO t1(t1) SELECT x FROM t2;
|
||
|
+ } {0 {}}
|
||
|
+}
|
||
|
+
|
||
|
|
||
|
#-------------------------------------------------------------------------
|
||
|
reset_db
|
||
|
do_test 26.0 {
|
||
|
sqlite3 db {}
|
||
|
|