fix bug #3903 and retaing preference when order by in query without backquoting

Signed-off-by: Smita Kumari <kumarismita62@gmail.com>