Actions
Defect #14626
closedRepositories' extra_info column is too short with MySQL
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
In the database table repositories a field named "extra_info" has type "text", which in mysql is limited to 65535 chars. This breaks fetch_changesets command on repositories with a very large amount of branches (git). Actual reason is that is stores only part of the last commit hash or other line (like "!b" for "!binary"), and this causes errors in in fetch_changeset:
$ /usr/local/rvm/bin/redmine_rails runner "Repository.fetch_changesets" -e production /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands/runner.rb:53:in `eval': comparison of String with nil failed (ArgumentError) from /u01/apps/redmine-2.3.1/app/models/repository/git.rb:145:in `fetch_changesets' from /u01/apps/redmine-2.3.1/app/models/repository.rb:333:in `block (2 levels) in fetch_changesets' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `each' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `method_missing' from /u01/apps/redmine-2.3.1/app/models/repository.rb:331:in `block in fetch_changesets' from /u01/apps/redmine-2.3.1/app/models/repository.rb:330:in `each' from /u01/apps/redmine-2.3.1/app/models/repository.rb:330:in `fetch_changesets' from (eval):1:in `<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands/runner.rb:53:in `eval' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands/runner.rb:53:in `<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands.rb:64:in `require' from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands.rb:64:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>'
Changing the field type to LONGTEXT fixes the problem.
Files
Related issues
Actions