Using 3.2.2, doing:
a = Model.where("created_at > '2011-10-01
00:00:00'").where("created_at < '2012-01-01
00:00:00'")
Always results in
ActiveRecord::StatementInvalid (Mysql2::Error: Lost connection to
MySQL server during query: SELECT `models`.* FROM `models`
WHERE (created_at > '2011-10-01 00:00:00') AND (created_at <
'2012-01-01 00:00:00'))
If I leave off one of the conditions it works fine. The raw query via
Mysql2::Client#query works fine, and returns within milliseconds, so
it's not a timeout issue.
Any ideas? I'm stumped.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment