Defect #16143

Can't insert too long comment field from repository (MySQL)

Added by Sergey Azarkevich over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:SCM
Target version:2.5.0
Resolution:Fixed Affected version:2.4.3

Description

During reading latest revisions from SVN repository we encounter issue with too long comment:

ActiveRecord::StatementInvalid (Mysql2::Error: Data too long for column 'comments' at row 1: INSERT INTO `changesets` (`comments`, `commit_date`, `committed_on`, `committer`, `repository_id`, `revision`, `scmid`, `user_id`) VALUES ('..Here was looong comment..', '2014-02-07 15:10:46', '2014-02-07 15:10:46', 'pbaravik', 3, '30390', NULL, NULL)):
  app/models/repository/subversion.rb:72:in `block (2 levels) in fetch_changesets'
  app/models/repository/subversion.rb:71:in `block in fetch_changesets'
  app/models/repository/subversion.rb:70:in `reverse_each'
  app/models/repository/subversion.rb:70:in `fetch_changesets'
  app/controllers/repositories_controller.rb:114:in `show'

Log message was really long, something about 100K (autogenerated after merge). After trimming this log message error disappears.

Is it possible trim too long comments before insert them in database?


Related issues

Related to Redmine - Defect #20127: The description column in the issues table is too short (... Closed

Associated revisions

Revision 12944
Added by Jean-Philippe Lang over 4 years ago

Changeset comments set to longtext for handling comments > 64KB with Mysql (#16143).

History

#1 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

Column changed to largetext in r12944 for storing comments larger than 64K.

#2 Updated by Jean-Philippe Lang over 4 years ago

  • Subject changed from Can't insert too long comment field from repository to Can't insert too long comment field from repository (MySQL)
  • Status changed from Resolved to Closed

Merged in 2.5-stable.

#3 Updated by Go MAEDA almost 3 years ago

  • Related to Defect #20127: The description column in the issues table is too short (MySQL) added

Also available in: Atom PDF