aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/fts5/fts5_index.c2
-rw-r--r--ext/fts5/test/fts5integrity.test6
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c
index 3be556f8a..7036e57f5 100644
--- a/ext/fts5/fts5_index.c
+++ b/ext/fts5/fts5_index.c
@@ -8305,7 +8305,7 @@ static void fts5TestTerm(
if( *pbFail==0
&& rc==SQLITE_OK
&& (pPrev->n!=n || memcmp(pPrev->p, z, n))
- && p->pHash->nEntry==0
+ && (p->pHash==0 || p->pHash->nEntry==0)
){
u64 cksum3 = *pCksum;
const char *zTerm = (const char*)&pPrev->p[1]; /* term sans prefix-byte */
diff --git a/ext/fts5/test/fts5integrity.test b/ext/fts5/test/fts5integrity.test
index 5c4002180..4bf120c44 100644
--- a/ext/fts5/test/fts5integrity.test
+++ b/ext/fts5/test/fts5integrity.test
@@ -37,6 +37,12 @@ do_execsql_test 2.1 {
INSERT INTO yy(yy) VALUES('integrity-check');
}
+db close
+sqlite3 db test.db
+do_execsql_test 2.1 {
+ INSERT INTO yy(yy) VALUES('integrity-check');
+}
+
#--------------------------------------------------------------------
#
do_execsql_test 3.0 {