You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActiveRecord::StatementInvalid: Mysql2::Error: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery': ModelName.update_all(["field_id = ?, updated_at = ?", 345, Time.now], ["file_id = 0 "], :order => "id", :limit => 1)
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:207:in rescue in log' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:199:inlog'
from /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:314:in execute' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:288:inupdate_sql'
from /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:331:in update_sql' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:49:inupdate'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/query_cache.rb:16:in update' from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:336:inproxy_connection_method'
from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:122:in block in update' from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:243:inuse_master_connection'
from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:121:in update' from /usr/local/lib/ruby/gems/1.9.1/gems/arel-2.0.9/lib/arel/crud.rb:20:inupdate'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation.rb:159:in update_all' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation.rb:155:inupdate_all'
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/base.rb:439:in update_all' from (irb):1 from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands/console.rb:44:instart'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands/console.rb:8:in start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:23:in<top (required)>'
from script/rails:6:in `require'
This query is working fine before I used seamless_database_pool gem.
Please let me know if there is any solution.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I am facing problem while the executing below query
ModelName.update_all(["field_id = ?, updated_at = ?", 345, Time.now], ["field_id = 1"], :order => "id", :limit => 1)
Here is the exception I am getting
ActiveRecord::StatementInvalid: Mysql2::Error: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery': ModelName.update_all(["field_id = ?, updated_at = ?", 345, Time.now], ["file_id = 0 "], :order => "id", :limit => 1)
from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:207:in
rescue in log' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:199:in
log'from /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:314:in
execute' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:288:in
update_sql'from /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:331:in
update_sql' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:49:in
update'from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/query_cache.rb:16:in
update' from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:336:in
proxy_connection_method'from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:122:in
block in update' from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:243:in
use_master_connection'from /usr/local/lib/ruby/gems/1.9.1/gems/seamless_database_pool-1.0.11/lib/active_record/connection_adapters/seamless_database_pool_adapter.rb:121:in
update' from /usr/local/lib/ruby/gems/1.9.1/gems/arel-2.0.9/lib/arel/crud.rb:20:in
update'from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation.rb:159:in
update_all' from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation.rb:155:in
update_all'from /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/base.rb:439:in
update_all' from (irb):1 from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands/console.rb:44:in
start'from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands/console.rb:8:in
start' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:23:in
<top (required)>'from script/rails:6:in `require'
This query is working fine before I used seamless_database_pool gem.
Please let me know if there is any solution.
Thanks
The text was updated successfully, but these errors were encountered: