diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-10-05 14:46:31 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-10-05 14:54:06 +0200 |
commit | 930c2f315c6a9768d31a80d35d2a2550b588deaa (patch) | |
tree | c8e029cc1e01509f36e230eb1d1c1039886ca680 /.gitignore | |
parent | 71aac24f3fe8cb396c9d232453d8721519cae914 (diff) | |
download | cuirass-930c2f315c6a9768d31a80d35d2a2550b588deaa.tar cuirass-930c2f315c6a9768d31a80d35d2a2550b588deaa.tar.gz |
Do not allow full search on nix_name field.
Searching for something like "%a%" can take up to ten minutes. Remove the
usage of special characters "^" and "$" in queries. Instead, always add a "%"
character at the end of the query. Also add an index on the nix_name field.
Fixes: <https://issues.guix.gnu.org/43791>.
* src/sql/upgrade-13.sql: New file.
* Makefile.am (dist_sql_DATA): Add it.
* src/schema.sql (Builds_nix_name): New index.
* src/cuirass/database.scm (query->bind-arguments): Remove support for "^" and
"$" special characters. Instead make sure that the query does not contain any
"%" character and prefix the query by "%".
(db-get-builds-by-search): Remove an useless query nesting level.
* src/cuirass/templates.scm (search-form): Adapt the search help message
accordingly.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions