mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Improve corruption detection in fts3 shadow tables earlier in order to prevent an assert() from failing.
FossilOrigin-Name: a9ec8c8f80a59badabb0afdb4189f0fd2934f936530d4151de395b3a7e7c1f1f
This commit is contained in:
@ -5834,4 +5834,17 @@ do_catchsql_test 36.1 {
|
||||
INSERT INTO f(f) VALUES ('merge=59,59');
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 37.0 {
|
||||
CREATE VIRTUAL TABLE f USING fts3(a,b);
|
||||
INSERT INTO f_segdir VALUES (28,0,0,0,'0 0',x'00');
|
||||
INSERT INTO f_segdir VALUES (0,241,0,0,'0 0',x'0001000030310000f1');
|
||||
}
|
||||
|
||||
do_catchsql_test 37.1 {
|
||||
INSERT INTO f VALUES (0,x'00');
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
finish_test
|
||||
|
@ -234,13 +234,13 @@ if {$tcl_platform(byteOrder)=="littleEndian"} {
|
||||
} else {
|
||||
set res {X'0000000200000000000000000000000E0000000E00000001000000010000000100000001'}
|
||||
}
|
||||
do_execsql_test fts4aa-6.10 {
|
||||
do_catchsql_test fts4aa-6.10 {
|
||||
CREATE VIRTUAL TABLE f USING fts4();
|
||||
INSERT INTO f_segdir VALUES (77,91,0,0,'255 77',x'0001308000004d5c4ddddddd4d4d7b4d4d4d614d8019ff4d05000001204d4d2e4d6e4d4d4d4b4d6c4d004d4d4d4d4d4d3d000000004d5d4d4d645d4d004d4d4d4d4d4d4d4d4d454d6910004d05ffff054d646c4d004d5d4d4d4d4d3d000000004d4d4d4d4d4d4d4d4d4d4d69624d4d4d04004d4d4d4d4d604d4ce1404d554d45');
|
||||
INSERT INTO f_segdir VALUES (77,108,0,0,'255 77',x'0001310000fa64004d4d4d3c5d4d654d4d4d614d8000ff4d05000001204d4d2e4d6e4d4d4dff4d4d4d4d4d4d00104d4d4d4d000000004d4d4d0400311d4d4d4d4d4d4d4d4d4d684d6910004d05ffff054d4d6c4d004d4d4d4d4d4d3d000000004d4d4d4d644d4d4d4d4d4d69624d4d4d03ed4d4d4d4d4d604d4ce1404d550080');
|
||||
INSERT INTO f_stat VALUES (0,x'80808080100000000064004d4d4d3c4d4d654d4d4d614d8000ff4df6ff1a00204d4d2e4d6e4d4d4d104d4d4d4d4d4d00104d4d4d4d4d4d69574d4d4d000031044d4d4d3e4d4d4c4d05004d6910');
|
||||
SELECT quote(matchinfo(f,'pnax')) from f where f match '0 1';
|
||||
} $res
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
# 2019-11-18 Detect infinite loop in fts3SelectLeaf()
|
||||
db close
|
||||
|
Reference in New Issue
Block a user