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

Bug fix in sqlite3_analyzer: for databases larger than 1GiB, take into

account the lock-byte page when calculating the number of freelist pages.

FossilOrigin-Name: 26a909cdd32afee0f15968ca6f611eb259373b2a2195d0b3d47cfba103f1e6d6
This commit is contained in:
drh
2023-10-14 10:54:37 +00:00
parent 9132b8816a
commit c84a0b2195
3 changed files with 8 additions and 7 deletions

View File

@ -581,6 +581,7 @@ set inuse_pgcnt [expr wide([mem eval $sql])]
set inuse_percent [percent $inuse_pgcnt $file_pgcnt]
set free_pgcnt [expr {$file_pgcnt-$inuse_pgcnt-$av_pgcnt}]
if {$file_bytes>1073741824 && $free_pgcnt>0} {incr free_pgcnt -1}
set free_percent [percent $free_pgcnt $file_pgcnt]
set free_pgcnt2 [db one {PRAGMA freelist_count}]
set free_percent2 [percent $free_pgcnt2 $file_pgcnt]