-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.2, 3.2.0-dev
-
None
Currently there's no space between the index name and columns list when generating ADD INDEX sql query for MySQL DBMSes
https://github.com/phpbb/phpbb/blob/develop/phpBB/phpbb/db/tools.php#L2178
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . '(' . implode(', ', $column) . ')';
|
This may cause errors on earlier MySQL versions like 3.23 (which is supported by phpBB 3.1) like
SQL ERROR [ mysql ]
You have an error in your SQL syntax near 'user(user_id, notification_read)' at line 1 [1064]
SQL
ALTER TABLE phpbb3_notifications ADD INDEX user(user_id, notification_read)
Adding a space solves the issue.