MDL-73727 aimed to improve the performance of the
get_conversions_for_file SQL. Unfortunately it also
changed the behvaiour of the SQL.
On further investigation, there is nothing wrong with
the SQL. This patch returns it back to its initial state.
- Formatted the query to meet SQL coding styles
- Add index on {files} to prevent performance regression
- Fork the SQL query based on DB family based on support