https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42585
--- Comment #8 from Kyle M Hall (khall) <[email protected]> --- Created attachment 203796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203796&action=edit Bug 42585: Add static correctness analyzers This patch adds five checks for SQL that's wrong no matter how much data is in the database: * cartesian_product, comma separated FROM with no WHERE * join_without_on, a JOIN missing its ON or USING * sleep_call, SLEEP() in a saved report * select_for_update, FOR UPDATE or LOCK IN SHARE MODE * having_without_group_by, HAVING with no GROUP BY None of them are scale dependent, so the runner never suppresses them on a small database. Test Plan: 1) Apply this patch 2) prove t/Koha/Reports/Analyzer/Check/Static/ 3) Analyze a report for each of these: * SELECT * FROM borrowers, branches * SELECT * FROM borrowers JOIN branches * SELECT SLEEP(5) * SELECT * FROM borrowers FOR UPDATE * SELECT COUNT(*) FROM borrowers HAVING COUNT(*) > 5 4) Note each one gets the matching finding! -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
