MDL-49231 mod_glossary: Fix SQL queries for Oracle