[fix] Escape special characters as per MySQLdb
Merge pull request #759 from anandpdoshi/anand-august-8

[fix] Escape special characters as per MySQLdb