brianmario/mysql2 — pull request #313 by darrenli (2012-10-04 23:15:52+00:00)
Title: Cast connection options to correct datatype.

In order to set database connection options on Heroku using the Amazon RDS add-on, we need to specify the connection options via the DATABASE_URL as such:
```
mysql2://username:password@...rds.amazonaws.com/database?reconnect=true&read_timeout=2&connect_timeout=2&write_timeout=2
```
However, these connection options are interpreted as strings when initializing the mysql2 client which results in failures like:
```
2012-10-04T23:13:05+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b4/lib/mysql2/client.rb:26:in `connect_timeout=': wrong argument type String (expected Fixnum) (TypeError)
2012-10-04T23:13:05+00:00 app[web.1]:	from /app/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b4/lib/mysql2/client.rb:26:in `block in initialize'
2012-10-04T23:13:05+00:00 app[web.1]:	from /app/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b4/lib/mysql2/client.rb:24:in `each'
2012-10-04T23:13:05+00:00 app[web.1]:	from /app/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.12b4/lib/mysql2/client.rb:24:in `initialize'
...
```

This pull casts the connection option values to the desired types.