Project

General

Profile

Actions

Feature #17460

closed

MySQL 5.7 support

Added by Sam Sheen over 10 years ago. Updated about 1 year ago.

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

0%

Estimated time:
Resolution:
Fixed

Description

Env:
OS: Ubuntu 14.04 LTS
ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
rails (4.1.4, 3.2.19)
redmine-2.5.2
svn, version 1.8.9 (r1591380)
Environment:
Redmine version 2.5.2.stable
Ruby version 2.1.2-p95 (2014-05-08) [i686-linux]
Rails version 3.2.19
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.9
Filesystem
Redmine plugins:
no plugin installed

After install mysql, redmine, I try to set DB and find a problem in mysql 5.7.

root@lenovo:/usr/local/src/redmine-2.5.2# RAILS_ENV=production rake db:migrate
Setup: migrating ========================================================
-- create_table("attachments", {:force=>true})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE `attachments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `container_id` int(11) DEFAULT 0 NOT NULL, `container_type` varchar(30) DEFAULT '' NOT NULL, `filename` varchar(255) DEFAULT '' NOT NULL, `disk_filename` varchar(255) DEFAULT '' NOT NULL, `filesize` int(11) DEFAULT 0 NOT NULL, `content_type` varchar(60) DEFAULT '', `digest` varchar(40) DEFAULT '' NOT NULL, `downloads` int(11) DEFAULT 0 NOT NULL, `author_id` int(11) DEFAULT 0 NOT NULL, `created_on` datetime) ENGINE=InnoDB
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

But, redmine is compatible mysql-5.6.19 and work perfectly.

Sam Sheen

Files

mysql5.7_deadlocks_fix.patch (1.54 KB) mysql5.7_deadlocks_fix.patch Jean-Philippe Lang, 2015-03-16 21:20
issue_nested_set.rb.patch (4.86 KB) issue_nested_set.rb.patch deadlocks detection for testing Pavel Rosický, 2017-05-19 12:32

Related issues

Related to Redmine - Defect #19344: MySQL 5.6: IssueNestedSetConcurrencyTest#test_concurrency : always failsClosed

Actions
Has duplicate Redmine - Defect #28414: Does Redmine compatible with MySQL 5.7 or not ?Closed

Actions
Actions

Also available in: Atom PDF