Project

General

Profile

Actions

Defect #22119

closed

Error: Data too long for column 'notes' when copy paste pictures

Added by Thomas Koch about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

I was copy&pasting some text with an Picture to the Issue notes. It gave me an awesome (working) preview, but a Redmine 500 error while saving (Internal error page was shown). My log-file reads:

ActiveRecord::StatementInvalid (Mysql2::Error: Data too long for column 'notes' at row 1: INSERT INTO `journals` (`journalized_id`, `journalized_type`, `user_id`, `notes`, `created_on`) VALUES (8127, 'Issue', 104, '<p><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAl0AAADuCAYAAAADQ7LZAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAA...

...CYII=\" /></p>\r\n', '2016-02-29 10:11:41')):
  app/models/journal.rb:67:in `save'
  app/models/issue.rb:1659:in `create_journal'
  app/models/issue.rb:182:in `create_or_update'
  app/controllers/issues_controller.rb:487:in `block in save_issue_with_child_records'
  app/controllers/issues_controller.rb:475:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:180:in `update'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'


Related issues

Related to Redmine - Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQLClosedGo MAEDA

Actions
Is duplicate of Redmine - Feature #19869: Consider increasing the size limit of description and note columns for ticketsClosed

Actions
Actions #1

Updated by Go MAEDA about 8 years ago

What is the size of the text and what database do you use?
I guess the text is longer than 64KB and the database is MySQL.

Actions #2

Updated by Thomas Koch about 8 years ago

Yes, Mysql (as the error shows as well)
I do not know the size of that image, but I guess it will be more the 64kB.

Actions #3

Updated by Go MAEDA about 8 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

The size of issue.descpiption and journal.notes are limited to 64KB on MySQL for now.
Closing this issue as a duplicate of #19869.

Actions #4

Updated by Go MAEDA about 8 years ago

  • Is duplicate of Feature #19869: Consider increasing the size limit of description and note columns for tickets added
Actions #5

Updated by Thomas Koch about 8 years ago

Converting the whole database from utf8 to utf8mb4 solve this issue! (see: #21398)

The data type of all text fields got automatically changed from text to mediumtext, which can hold up to 16MB!

Redmine should catch this exception and give more details. Same here: #21398!

Actions #6

Updated by Marius BÄ‚LTEANU over 4 years ago

  • Related to Feature #31921: Changes to properly support 4 byte characters (emoji) when database is MySQL added
Actions

Also available in: Atom PDF