Project

General

Profile

Actions

Defect #23586

closed

Create index on mysql exceed limits

Added by Chen Lei over 7 years ago. Updated over 1 year ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When I create database:

RAILS_ENV=production bundle exec rake db:migrate

Got these errors, Redmine version: (3.3.0, 3.2.3 git master)

-- add_index(:wiki_pages, [:wiki_id, :title], {:name=>:wiki_pages_wiki_id_title})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE  INDEX `wiki_pages_wiki_id_title`  ON `wiki_pages` (`wiki_id`, `title`) 
/opt/redmine/db/migrate/028_create_wiki_pages.rb:8:in `up'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
ActiveRecord::StatementInvalid: Mysql2::Error: Specified key was too long; max key length is 767 bytes: CREATE  INDEX `wiki_pages_wiki_id_title`  ON `wiki_pages` (`wiki_id`, `title`) 
/opt/redmine/db/migrate/028_create_wiki_pages.rb:8:in `up'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Mysql2::Error: Specified key was too long; max key length is 767 bytes
/opt/redmine/db/migrate/028_create_wiki_pages.rb:8:in `up'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Files

key_too_long_fix.patch (31.5 KB) key_too_long_fix.patch Andrey Luzgin, 2018-01-11 17:55

Related issues

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

Actions
Actions

Also available in: Atom PDF