Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-13117

Installation fails on MySQL 5.7 because auto_increment columns can be NULL

XMLWordPrintable

      SQL ERROR [ mysqli ]
       
      All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead [1171]
       
      SQL
       
      CREATE TABLE phpbb_acl_options ( auth_option_id mediumint(8) UNSIGNED NULL auto_increment, auth_option varchar(50) DEFAULT '' NOT NULL, is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (auth_option_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
      

      Fix for 3.1 is to update phpbb/db/tools.php as follows (analogous to code already in place for mssql):

      -                               if (!is_null($column_data[1]))
      +                               if (!is_null($column_data[1]) || (isset($column_data[2]) && $column_data[2] == 'auto_increment'))
      

            nickvergessen Joas Schilling
            naderman Nils Adermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: