Jump to content

Community

Bug in IPS upgrader with MySQL 8.0.17-8.0.18


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 post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy