Project

General

Profile

Actions

Defect #16143

closed

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

Added by Sergey Azarkevich almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
SCM
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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 (MySQL)ClosedJean-Philippe Lang

Actions
Actions #1

Updated by Jean-Philippe Lang over 10 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.

Actions #2

Updated by Jean-Philippe Lang over 10 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.

Actions #3

Updated by Go MAEDA over 9 years ago

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

Also available in: Atom PDF