datamapper / do

DataObjects
147 stars 73 forks source link

Add support for MySQL 5.7 #92

Closed dbussink closed 8 years ago

dbussink commented 8 years ago

This fails because the behavior for mysql_real_escape_string has changed in 5.7. This is documented in https://dev.mysql.com/doc/refman/5.7/en/mysql-real-escape-string.html in the explicit Note there.

Because of this we need to switch to using mysql_real_escape_string_quote on 5.7. Also adding a guard for the failure code to return an exception that indicates people probably need to recompile the extension agains a newer version.

Fixes #88