FTS detection treats table names as LIKE patterns
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Empieza leyendo detect_fts() y los patrones LIKE que usa para encontrar tablas FTS; el issue identifica el tratamiento de comodines en nombres de tablas como la causa. Reproduce el problema con el ejemplo proporcionado book_titles y bookXtitles, y luego comprueba si hay una prueba de regresión que cubra tanto _ como %. El trabajo está terminado cuando se detecta book_titles_fts y la búsqueda de incorrect no devuelve filas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 2.2k
- Forks
- 215
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de simonw/sqlite-utils
-
Contributing docs: local test runs silently skip SpatiaLite and ext.c tests, and the setup steps assume SSH and uvPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
simonw/sqlite-utils#928 ·
Los mantenedores suelen responder en 3 días
-
Tests use CliRunner.isolated_filesystem(), which is deprecated and will be removed in Click 9.0Posiblemente ocupada @devpryan7792 la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
simonw/sqlite-utils#916 ·
Los mantenedores suelen responder en 3 días
-
rows_from_file() splits a single-column CSV file on a letter, or raises csv.ErrorPosiblemente ocupada @L4XB la tomó hace 20 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
simonw/sqlite-utils#907 ·
Los mantenedores suelen responder en 3 días
-
enable_fts() exhausts iterator columns before populating the indexPosiblemente ocupada @syahra712 la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
simonw/sqlite-utils#902 ·
Los mantenedores suelen responder en 3 días
-
rows_from_file() ignores ignore_extras= and extras_key= for anything that isn't Format.CSVPosiblemente ocupada @feiiiiii5 la tomó hace 37 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
simonw/sqlite-utils#892 ·
Los mantenedores suelen responder en 3 días
Todos los issues de simonw/sqlite-utils
Issues similares
-
Remove the `pull_request_target` workflow before GitHub blocks itPosiblemente ocupada @jat255 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
IBM/mcp-context-forge#7483 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
[Bug Report]: OpenAI 辅助 API 连通性测试因输出上限仅 1 token 误报“未知错误”Posiblemente ocupada @fjfanjian la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Project-N-E-K-O/N.E.K.O#3640 ·
Los mantenedores suelen responder en 1 día
-
author-page correction
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
acl-org/acl-anthology#10808 · 1 comentario ·
Los mantenedores suelen responder en 1 día