I am unable to install this module with MySql 5.7. The error returned is

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 {social_share_networks} ( `machine_name` VARCHAR(255) DEFAULT NULL, `human_name` VARCHAR(255) DEFAULT NULL, `url` BLOB DEFAULT NULL, `weight` INT NOT NULL DEFAULT 0, `locked` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`machine_name`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8; Array ( ) in db_create_table() (line 2720 of /var/www/tcd-dev/includes/database/database.inc).

It is probably the same issue as found here https://www.drupal.org/node/2388139

I have fixed it locally with by adding the 'not null' => TRUE to the schema.

CommentFileSizeAuthor
#3 2792201-3-mysql-5.7-support.patch665 bytestanmayk

Comments

zveljkovic created an issue. See original summary.

zveljkovic’s picture

Issue summary: View changes
tanmayk’s picture

Status: Active » Needs review
StatusFileSize
new665 bytes

Got same error. Here is the patch for fix.

dieuwe’s picture

Status: Needs review » Reviewed & tested by the community

Can confirm that this is a problem on MySQL 5.7 and that this patch fixes the problem.

  • 4309287 committed on 7.x-3.x
    Issue #2792201 by zveljkovic: Unable to install with MySql 5.7
    

  • e59deea committed on 7.x-2.x
    Issue #2792201 by zveljkovic: Unable to install with MySql 5.7
    
blacksnipe’s picture

Assigned: Unassigned » blacksnipe
Status: Reviewed & tested by the community » Fixed

I've included the patch in both 7.x-2.x and 7.x-3.x.
Thanks for the good work.

In case of other issues, feel free to reopen this issue.

blacksnipe’s picture

Status: Fixed » Closed (fixed)