Actions
Defect #2012
closedrevision 1907 breaks mysql 4.0.27
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2008-10-09
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
"svn diff -r1906:1907 app/models/project.rb"
This is what appears to have broken mysql 4.0.27
Tried with rails 2.1.0 and 2.1.1
I'm on ruby 1.8.6, mysql 4.0.27
Processing WelcomeController#index (for xx.xx.xx.134 at 2008-10-05 11:05:38) [GET] Session ID: e0c0e35a880aba66f857e3161469b771 Parameters: {"action"=>"index", "controller"=>"welcome"} ActiveRecord::StatementInvalid (Mysql::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 'EXISTS (SELECT em.id FROM enabled_modules em WHERE em.name='new: SELECT `news`.`id` AS t0_r0, `news`.`project_id` AS t0_r1, `news`.`title` AS t0_r2, `news`.`summary` AS t0_r3, `news`.`description` AS t0_r4, `news`.`author_id` AS t0_r5, `news`.`created_on` AS t0_r6, `news`.`comments_count` AS t0_r7, `users`.`id` AS t1_r0, `users`.`login` AS t1_r1, `users`.`hashed_password` AS t1_r2, `users`.`firstname` AS t1_r3, `users`.`lastname` AS t1_r4, `users`.`mail` AS t1_r5, `users`.`mail_notification` AS t1_r6, `users`.`admin` AS t1_r7, `users`.`status` AS t1_r8, `users`.`last_login_on` AS t1_r9, `users`.`language` AS t1_r10, `users`.`auth_source_id` AS t1_r11, `users`.`created_on` AS t1_r12, `users`.`updated_on` AS t1_r13, `users`.`type` AS t1_r14, `projects`.`id` AS t2_r0, `projects`.`name` AS t2_r1, `projects`.`description` AS t2_r2, `projects`.`homepage` AS t2_r3, `projects`.`is_public` AS t2_r4, `projects`.`parent_id` AS t2_r5, `projects`.`projects_count` AS t2_r6, `projects`.`created_on` AS t2_r7, `projects`.`updated_on` AS t2_r8, `projects`.`identifier` AS t2_r9, `projects`.`status` AS t2_r10 FROM `news` LEFT OUTER JOIN `users` ON `users`.id = `news`.author_id LEFT OUTER JOIN `projects` ON `projects`.id = `news`.project_id WHERE (projects.status=1 AND EXISTS (SELECT em.id FROM enabled_modules em WHERE em.name='news' AND em.project_id=projects.id)) ORDER BY news.created_on DESC LIMIT 5): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:299:in `execute' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:515:in `select' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:80:in `cache_sql' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1417:in `select_all_rows' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1250:in `find_with_associations' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1248:in `catch' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1248:in `find_with_associations' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1339:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:536:in `find' /app/models/news.rb:33:in `latest' /app/controllers/welcome_controller.rb:21:in `index' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in `handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `synchronize' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:103:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:153:in `with_signal_handler' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:101:in `process_request' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:78:in `process_each_request' /usr/lib/ruby/1.8/fcgi.rb:612:in `each_cgi' /usr/lib/ruby/1.8/fcgi.rb:609:in `each' /usr/lib/ruby/1.8/fcgi.rb:609:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:77:in `process_each_request' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:76:in `catch' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:76:in `process_each_request' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:50:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:24:in `process!' /public/dispatch.fcgi:25 Rendering /xxxxxxxxxxxxxxx/redmine/public/500.html (500 Internal Server Error)
Related issues
Updated by Karl Heinz Marbaise about 16 years ago
The requirement have been changed to use MySQL 4.1 at least. See issue #1951 as well.
Updated by Stuart George about 16 years ago
- Status changed from New to Resolved
Closed because its a dupe of #1951
Actions