Jump to content

Bug in IPS upgrader with MySQL 8.0.17-8.0.18


Dr. McKay
 Share

Recommended Posts

I recently migrated my IPS3 install to a new server where I installed MySQL 8 instead of 5. Trying to get IPS3 working with MySQL 8 proved to be a great challenge, so I just bit the bullet and migrated to IPS4 and wrote off my incompatible apps and hooks. However, I ran into a bug in the IPS4 updater. As per the MySQL manual, MEMBER was added as a reserved keyword in 8.0.17 (will be made non-reserved in 8.0.19, which isn't yet released).

applications/core/setup/upg_40000/upgrade.php includes this query:

$toRun = \IPS\core\Setup\Upgrade::runManualQueries( array( array(
	'table' => 'core_voters',
	'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "core_voters ADD COLUMN poll MEDIUMINT UNSIGNED NOT NULL COMMENT 'The poll ID', 
			ADD INDEX poll (poll), 
			DROP INDEX tid, 
			ADD INDEX member(member_id, poll)"
) ) );

This fails when running MySQL >=8.0.17. The last line of the query should instead be ADD INDEX `member`(member_id, poll) with backticks. Would be great to have this fixed so nobody else gets bitten by this.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...