1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Enhance the RTree module to detect node truncation early and report an error.

FossilOrigin-Name: 66de6f4a9504ec2670b7273de8fb6955c80e03f7f73414ea6b80fd8a99f75976
This commit is contained in:
drh
2017-07-01 15:21:17 +00:00
parent fd76b71cac
commit c7b1ee5f6e
4 changed files with 25 additions and 8 deletions

View File

@ -216,5 +216,18 @@ do_corruption_tests rtreeA-6.1 {
2 "UPDATE t1 SET x1=x1+1, x2=x2+1"
}
#-------------------------------------------------------------------------
# Truncated blobs in the _node table.
#
create_t1
populate_t1
sqlite3 db test.db
do_execsql_test rtreeA-7.100 {
UPDATE t1_node SET data=x'' WHERE rowid=1;
} {}
do_catchsql_test rtreeA-7.110 {
SELECT * FROM t1 WHERE x1>0 AND x1<100 AND x2>0 AND x2<100;
} {1 {undersize RTree blobs in "t1_node"}}
finish_test