Project

General

Profile

Actions

Defect #2755

closed

Failing test after r2257 with MySQL 4.1.20: "test_sort_by_float_custom_field_asc(QueryTest)"

Added by Mischa The Evil almost 16 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2009-02-15
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

After re-starting my instance of CCRB I noticed the specified test failing after the check-in of r2257 on MySQL 4.1.20 with the following trace:

  1) Error:
test_sort_by_float_custom_field_asc(QueryTest):
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 'decimal(60,3)) FROM custom_values cv_sort WHERE cv_sort.customized_type='Issue' ' at line 1: SELECT `issues`.`id` AS t0_r0, `issues`.`tracker_id` AS t0_r1, `issues`.`project_id` AS t0_r2, `issues`.`subject` AS t0_r3, `issues`.`description` AS t0_r4, `issues`.`due_date` AS t0_r5, `issues`.`category_id` AS t0_r6, `issues`.`status_id` AS t0_r7, `issues`.`assigned_to_id` AS t0_r8, `issues`.`priority_id` AS t0_r9, `issues`.`fixed_version_id` AS t0_r10, `issues`.`author_id` AS t0_r11, `issues`.`lock_version` AS t0_r12, `issues`.`created_on` AS t0_r13, `issues`.`updated_on` AS t0_r14, `issues`.`start_date` AS t0_r15, `issues`.`done_ratio` AS t0_r16, `issues`.`estimated_hours` AS t0_r17, `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, `users`.`identity_url` AS t1_r15, `issue_statuses`.`id` AS t2_r0, `issue_statuses`.`name` AS t2_r1, `issue_statuses`.`is_closed` AS t2_r2, `issue_statuses`.`is_default` AS t2_r3, `issue_statuses`.`position` AS t2_r4, `trackers`.`id` AS t3_r0, `trackers`.`name` AS t3_r1, `trackers`.`is_in_chlog` AS t3_r2, `trackers`.`position` AS t3_r3, `trackers`.`is_in_roadmap` AS t3_r4, `projects`.`id` AS t4_r0, `projects`.`name` AS t4_r1, `projects`.`description` AS t4_r2, `projects`.`homepage` AS t4_r3, `projects`.`is_public` AS t4_r4, `projects`.`parent_id` AS t4_r5, `projects`.`created_on` AS t4_r6, `projects`.`updated_on` AS t4_r7, `projects`.`identifier` AS t4_r8, `projects`.`status` AS t4_r9, `projects`.`lft` AS t4_r10, `projects`.`rgt` AS t4_r11, `enumerations`.`id` AS t5_r0, `enumerations`.`opt` AS t5_r1, `enumerations`.`name` AS t5_r2, `enumerations`.`position` AS t5_r3, `enumerations`.`is_default` AS t5_r4 FROM `issues`  LEFT OUTER JOIN `users` ON `users`.id = `issues`.assigned_to_id  LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.id = `issues`.status_id  LEFT OUTER JOIN `trackers` ON `trackers`.id = `issues`.tracker_id  LEFT OUTER JOIN `projects` ON `projects`.id = `issues`.project_id  LEFT OUTER JOIN `enumerations` ON `enumerations`.id = `issues`.priority_id     WHERE (((projects.status=1 AND EXISTS (SELECT em.id FROM enabled_modules em WHERE em.name='issue_tracking' AND em.project_id=projects.id)) AND (1=0 OR projects.is_public = 1)))  ORDER BY (SELECT CAST(cv_sort.value AS decimal(60,3)) FROM custom_values cv_sort WHERE cv_sort.customized_type='Issue' AND cv_sort.customized_id=issues.id AND cv_sort.custom_field_id=6 AND cv_sort.value <> '' AND cv_sort.value IS NOT NULL LIMIT 1) ASC
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:302:in `execute'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:537:in `select'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations.rb:1429:in `select_all_rows'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations.rb:1260:in `find_with_associations'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations.rb:1258:in `catch'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations.rb:1258:in `find_with_associations'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1343:in `find_every'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:540:in `find'
    ./test/unit/query_test.rb:231:in `test_sort_by_float_custom_field_asc'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
    /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

Related issues

Related to Redmine - Defect #5778: Defect in the filters (custom field) from the list of issueClosedJean-Baptiste Barth2010-06-28

Actions
Related to Redmine - Defect #5726: Cannot sort issues on custom fieldsClosedMuntek Singh2010-06-22

Actions
Actions

Also available in: Atom PDF