Summary: | Broken SQL statement formed in Breeding.pm | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | jonathan.druart, nugged |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
I don't recreate, please provide steps to recreate the problem. I get an explosion if I search " " or "-", but not on the SQL query. You can reproduce with this command in koha-shell: perl -e 'use C4::Context; use C4::Breeding; C4::Breeding::BreedingSearch();' Well ok, but it's never called as it. It could be fixed however. (In reply to Jonathan Druart from comment #4) > Well ok, but it's never called as it. It could be fixed however. In some real life situation it happens as well but I don't know which one yet, I just got the error waiting in production logs and thought to report it to not forget to fix this :) |
The C4/Breeding.pm code doesn't properly form SQL statements and gives error instead: > DBD::mysql::st execute failed: You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right syntax to > use near '' at line 5 [for Statement "SELECT import_record_id, file_name, isbn, > title, author > FROM import_biblios > JOIN import_records USING (import_record_id) > JOIN import_batches USING (import_batch_id) > WHERE "] at /usr/share/koha/lib/C4/Breeding.pm line 100.