Making sort to be sent to master

When sorting is done based on external keys using the *BY* syntax it
returns a  `READONLY You can't write against a read only slave` exception