Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13117

Installation fails on MySQL 5.7 because auto_increment columns can be NULL

    Details

      Description

      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'))
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: