Vote #74959
完了Can't insert too long comment field from repository (MySQL)
0%
説明
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?
journals
Column changed to largetext in r12944 for storing comments larger than 64K.
--------------------------------------------------------------------------------
Merged in 2.5-stable.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,Closed,20127,The description column in the issues table is too short (MySQL)