FTS detection treats table names as LIKE patterns
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
調査の方向性
まず detect_fts() と、FTS テーブルを見つけるために使用している LIKE パターンを読んでください。issue では、テーブル名のワイルドカード処理が原因として挙げられています。提示された book_titles と bookXtitles の例で再現し、_ と % の両方を対象とする回帰テストがあるか確認してください。book_titles_fts が検出され、incorrect の検索で行が返されなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
When a table name contains _ or %, detect_fts() treats those characters as SQL LIKE wildcards. It can select another table's FTS index and use its matching row IDs against the requested table.
from sqlite_utils import Database
db = Database(memory=True)
db["bookXtitles"].insert({"title": "incorrect"}).enable_fts(["title"])
db["book_titles"].insert({"title": "correct"}).enable_fts(["title"])
print(db["book_titles"].detect_fts())
print(list(db["book_titles"].search("incorrect")))
Current main prints bookXtitles_fts and returns the row containing correct, even though that row does not match the search. It should detect book_titles_fts and return no rows for this query.
The same issue occurs with % in the table name. The table-name portion of the LIKE patterns needs escaping. The quote delimiters added for #434 prevent prefix matches but leave wildcard characters active.
Reproduced on Python 3.12 and SQLite 3.53.1 using current main.
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 215
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simonw/sqlite-utils のほかの issue
-
Contributing docs: local test runs silently skip SpatiaLite and ext.c tests, and the setup steps assume SSH and uv対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#928 ·
メンテナーはふだん 3 日以内に返信
-
Tests use CliRunner.isolated_filesystem(), which is deprecated and will be removed in Click 9.0対応中かも @devpryan7792 が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
simonw/sqlite-utils#916 ·
メンテナーはふだん 3 日以内に返信
-
rows_from_file() splits a single-column CSV file on a letter, or raises csv.Error対応中かも @L4XB が 20 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
simonw/sqlite-utils#907 ·
メンテナーはふだん 3 日以内に返信
-
enable_fts() exhausts iterator columns before populating the index対応中かも @syahra712 が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
simonw/sqlite-utils#902 ·
メンテナーはふだん 3 日以内に返信
-
rows_from_file() ignores ignore_extras= and extras_key= for anything that isn't Format.CSV対応中かも @feiiiiii5 が 37 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
simonw/sqlite-utils#892 ·
メンテナーはふだん 3 日以内に返信
simonw/sqlite-utils の issue をすべて見る
似ている issue
-
Remove the `pull_request_target` workflow before GitHub blocks it対応中かも @jat255 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
IBM/mcp-context-forge#7483 ·
メンテナーはふだん 2 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[Bug Report]: OpenAI 辅助 API 连通性测试因输出上限仅 1 token 误报“未知错误”対応中かも @fjfanjian が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Project-N-E-K-O/N.E.K.O#3640 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
acl-org/acl-anthology#10808 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信