1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Better error messages on showdb.

FossilOrigin-Name: 7e18e114b245d17aa259ea9ab42752ccc9ad5303bbac8d8e46928dd10319f545
This commit is contained in:
drh
2021-04-27 00:05:03 +00:00
parent 19a7f72ce2
commit 2f40dc9884
3 changed files with 9 additions and 9 deletions

View File

@ -917,12 +917,12 @@ static void page_usage_btree(
cellidx = cellstart + i*2;
if( cellidx+1 >= g.pagesize ){
page_usage_msg(pgno, "too many cells");
printf("ERROR: page %d too many cells (%d)\n", pgno, nCell);
break;
}
ofst = a[cellidx]*256 + a[cellidx+1];
if( ofst<cellidx+2 || ofst+4>=g.pagesize ){
page_usage_msg(pgno, "cell %d out of bounds", i);
printf("ERROR: page %d cell %d out of bounds\n", pgno, i);
continue;
}
child = decodeInt32(a+ofst);