bdurand / seamless_database_pool

Add support for master/slave database clusters in ActiveRecord to improve performance.
http://rdoc.info/projects/bdurand/seamless_database_pool
MIT License
224 stars 58 forks source link

Rails 5.0.1 placeholders are not working #43

Open lokanadhamm opened 7 years ago

lokanadhamm commented 7 years ago

Role.first Role Load (3130.9ms) SELECT roles. FROM roles ORDER BY roles.id ASC LIMIT ? ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1: SELECT roles. FROM roles ORDER BY roles.id ASC LIMIT ?

caseyprovost commented 6 years ago

I also get this for all or most queries. It prevents the Rails app from starting.

lokanadhamm commented 6 years ago

Try setting prepared_statements: false in database.yml

aquadrehz commented 3 years ago

This's helpful and should put to readme file.