vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   General Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=189)
-   -   Note for vB 3.0.2 upgraders: re public poll speed display optimisation (https://vborg.vbsupport.ru/showthread.php?t=66842)

Natch 07-03-2004 10:00 PM

Note for vB 3.0.2 upgraders: re public poll speed display optimisation
 
Re: https://vborg.vbsupport.ru/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:
Code:

        $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:
Code:

//        $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 ...

Boofo 07-04-2004 03:22 PM

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

Natch 07-04-2004 03:27 PM

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

TCB 07-05-2004 09:22 AM

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?

Brad 07-05-2004 09:27 AM

Quote:

Originally Posted by TCB
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. :)


All times are GMT. The time now is 11:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00955 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete