Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
database update system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Feb 2016 at 14:30 UTC
Updated:
2 Jan 2019 at 23:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mstiMysql 5.7.3 adds significant changes: http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-3.html
This patch adds a
'not null' => TRUEto the database fieldComment #3
SuneK commentedThis is also present in Drupal 7.43 when upgrading from Drupal 6. With PHP 5.6.20 and MySQL 5.7.9.1 I get
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE {system_update_7061} ( `vid` INT DEFAULT NULL, PRIMARY KEY (`vid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores temporary data for system_update_7061.'; Array ( ) in db_create_table() (line 2720 of D:\Drupal\includes\database\database.inc).for system_update_7061.
In my case I solved it by changing line 2796 of system.install to
Comment #4
gregglesThis patch looks good to me. It is probably also important/necessary to add #2615496: A serial/primary key field can not be added to an existing table for some databases to fully fix this problem.
Comment #5
mfbThere's a RTBC duplicate @ #2981248: MySQL 5.7 incompatibility in system upgrade 7061
Comment #6
mfbTests are passing on MySQL 5.7 so setting to RTBC.
Comment #7
joseph.olstadthis didn't make it into 7.60, bumping to 7.61
Comment #8
joseph.olstadclosing in favour of:
Comment #9
polThis has been fixed in 7.x today.
Thanks all.
Comment #10
joseph.olstadC'est moi qui te remercie, Bonne année Pol!