Fix Thorim apply sql.
[TW157]: fix an issue with the custom chat logs.
Merge branch 'master' of github.com:TrueWoW/TrinityCore