Helpful Information
 
 
Category: vBulletin Article Depository
Note for vB 3.0.2 upgraders: re public poll speed display optimisation

Re: http://www.vbulletin.org/forum/showthread.php?t=66694

If you have installed this, you will encounter an error when running the upgrade script to 3.0.2.

It will occur @ step 4 - please note if you wish to avoid this error, please make the following alteration to your UPGRADE13.PHP script before running your upgrade.

FIND: $query[] = "ALTER TABLE " . TABLE_PREFIX . "pollvote DROP INDEX userid";
$explain[] = sprintf($upgrade_phrases['upgrade1.php']['altering_x_table'], 'pollvote', 1, 2);

$query[] = "ALTER TABLE " . TABLE_PREFIX . "pollvote ADD INDEX pollid (pollid, userid)";
$explain[] = sprintf($upgrade_phrases['upgrade1.php']['altering_x_table'], 'pollvote', 2, 2);

and comment those lines like so:// $query[] = "ALTER TABLE " . TABLE_PREFIX . "pollvote DROP INDEX userid";
// $explain[] = sprintf($upgrade_phrases['upgrade1.php']['altering_x_table'], 'pollvote', 1, 2);
//
// $query[] = "ALTER TABLE " . TABLE_PREFIX . "pollvote ADD INDEX pollid (pollid, userid)";
// $explain[] = sprintf($upgrade_phrases['upgrade1.php']['altering_x_table'], 'pollvote', 2, 2);


HTH all ...

Shouldn't just the second 2 lines be commented out? Xenon doesn't drop anything fron the first line in the hack.

Nah - cos in the second pair of lines it adds both the pollid and userid INDEXES, it needs to drop the userid index to do that INSERT in a "neat" way - the DROP in the first pair is for that reason ...

If you have applied Xenon's optimisation, then you have the pollid and userid INDEXES, in which case you need neither of these queries ...

Another way to do it would be to drop the pollid index in the first pair - to gain the "neatness" referred to earlier ;)

I've just upgraded succesfully to 3.02 (thanks to this topic). Now there's a new 3.03 upgrade. Do we need to edit lines again?

I've just upgraded succesfully to 3.02 (thanks to this topic). Now there's a new 3.03 upgrade. Do we need to edit lines again?
No. :)










privacy (GDPR)