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

If a table has one or more rows and it has a partial index has zero rows,

still make an entry in the sqlite_stat1 table for the partial index, so that
we know that "PRAGMA optimize" does not need to redo the whole table.

FossilOrigin-Name: e147b18991dd462fff367442acb0504fdf193a31843ed34ec8c1ced30747bf8a
This commit is contained in:
drh
2024-02-19 16:22:58 +00:00
parent 6c6356f7f2
commit e7bdb2172c
7 changed files with 70 additions and 59 deletions

View File

@ -92,7 +92,7 @@ do_test 2.1 {
} {}
do_execsql_test -db db2 2.2 {
SELECT * FROM sqlite_stat1
SELECT * FROM sqlite_stat1 ORDER BY tbl, idx
} {
t1 sqlite_autoindex_t1_1 {32 1}
t1 t1b {32 4}
@ -104,7 +104,7 @@ do_test 2.3 {
} {}
do_execsql_test -db db2 2.4 {
SELECT * FROM sqlite_stat1
SELECT * FROM sqlite_stat1 ORDER BY tbl, idx;
} {
t1 sqlite_autoindex_t1_1 {32 1}
t1 t1b {32 4}