Fixed #3830 Can't export custom query because it lowercases table names - Latestgit 

The problem is when exporting some selected rows of an uppercase table, the exported dump doesn't contain insert statement for those selected rows. The problem caused because inside the code it transform the sql statement to lowercase and in-turn it will make the table name to lowercase.