mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-11-26 03:49:47 +01:00
Fix bug with detect_fts() and similar table names, closes #434
This commit is contained in:
parent
1b09538bc6
commit
b8af3b96f5
3 changed files with 39 additions and 15 deletions
|
|
@ -54,14 +54,19 @@ def test_with_tracer():
|
|||
"SELECT name FROM sqlite_master\n"
|
||||
" WHERE rootpage = 0\n"
|
||||
" AND (\n"
|
||||
" sql LIKE '%VIRTUAL TABLE%USING FTS%content=%dogs%'\n"
|
||||
" sql LIKE :like\n"
|
||||
" OR sql LIKE :like2\n"
|
||||
" OR (\n"
|
||||
' tbl_name = "dogs"\n'
|
||||
" tbl_name = :table\n"
|
||||
" AND sql LIKE '%VIRTUAL TABLE%USING FTS%'\n"
|
||||
" )\n"
|
||||
" )"
|
||||
),
|
||||
None,
|
||||
" )",
|
||||
{
|
||||
"like": "%VIRTUAL TABLE%USING FTS%content=[dogs]%",
|
||||
"like2": '%VIRTUAL TABLE%USING FTS%content="dogs"%',
|
||||
"table": "dogs",
|
||||
},
|
||||
)
|
||||
),
|
||||
("select name from sqlite_master where type = 'view'", None),
|
||||
("select sql from sqlite_master where name = ?", ("dogs_fts",)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue