Don't incorrectly detect VIEWs as supporting FTS

This commit is contained in:
Simon Willison 2017-11-24 14:51:00 -08:00
commit c5c923d93c
No known key found for this signature in database
GPG key ID: FBB38AFE227189DB
2 changed files with 6 additions and 1 deletions

View file

@ -287,7 +287,10 @@ def detect_fts_sql(table):
where rootpage = 0
and (
sql like '%VIRTUAL TABLE%USING FTS%content="{table}"%'
or tbl_name = "{table}"
or (
tbl_name = "{table}"
and sql not like 'CREATE VIEW%'
)
)
'''.format(table=table)