Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
MyISAM 2 InnoDB - Changes tables engine from MyISAM to InnoDB Details »»
MyISAM 2 InnoDB - Changes tables engine from MyISAM to InnoDB
Version: 1.0.0, by PlusVB PlusVB is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.8.x Rating:
Released: 11-24-2009 Last Update: 11-24-2009 Installs: 26
DB Changes Uses Plugins
Re-useable Code Translations  
No support by the author.

After reading Anders is blog: Part 1 vB4mance: Helping communities grow, performance data model changes in vB 4.0 Thanks Anders, I've decided to make a simple product to bring the power of InnoDB to anyone who wants it.

Just import the product and go to Maintenance->Update Counters and scroll down, more down, then you'll find Change tables engine to InnoDB

It can be used with 3.5 3.6 3.7 3.8 and 4.0, and I don't know if I should start a new thread in the "vBulletin 4.0 Add-ons".

Please make sure to back-up your database before doing this.

Enjoy.

Download Now

File Type: xml product-plusvb_myisam_to_innodb.xml (3.1 KB, 303 views)

Screenshots

File Type: png Change tables engine to InnoDB.png (5.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-21-2010, 09:46 PM
saadessa saadessa is offline
 
Join Date: Jan 2008
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you iwill try
Reply With Quote
  #13  
Old 10-16-2010, 03:23 AM
orok orok is offline
 
Join Date: Jun 2005
Location: Gaza
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
no needed to be installed after done ?!
Reply With Quote
  #14  
Old 08-31-2012, 08:18 PM
Mr GRiM's Avatar
Mr GRiM Mr GRiM is offline
 
Join Date: Jul 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on 4.2 thanks
Reply With Quote
  #15  
Old 09-15-2012, 07:32 AM
mmikel_atef's Avatar
mmikel_atef mmikel_atef is offline
 
Join Date: Apr 2010
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to convert back?
Reply With Quote
  #16  
Old 10-14-2012, 01:54 AM
Mr GRiM's Avatar
Mr GRiM Mr GRiM is offline
 
Join Date: Jul 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah it would be nice if this could be reversed but I don't think we are going to get any reply for this

Edit: I just had a go at reversing this by just swapping the names in the xml file and I think it worked OK, just make sure you backup your database first in case anything goes wrong, I am not a coder so if anyone want to have another go at this and make a proper one feel free, just wanted to give the option to reverse this for anyone who found this wasn't for them.
Attached Files
File Type: xml product-MrGRiM_InnoDB_to_MyISAM.xml (3.1 KB, 36 views)
Reply With Quote
  #17  
Old 02-17-2013, 12:16 AM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I was looking for something like this for a while, and for some reason I didn't find this before. I will do some tests and post here is the performance of our forum increased or not.
Reply With Quote
  #18  
Old 02-18-2013, 11:21 PM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With our very busy forums, converting to InnoDB made the CPU load on our MySQL server to go throught he roof. I had to revert back to MyISAM.
Reply With Quote
  #19  
Old 08-11-2016, 01:33 PM
s_cocis s_cocis is offline
 
Join Date: Nov 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how to convert back?
Reply With Quote
  #20  
Old 01-12-2017, 12:49 AM
kotkerk's Avatar
kotkerk kotkerk is offline
 
Join Date: Nov 2005
Location: Portugal
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

create file cv.php with content:
PHP Code:
<?php
error_reporting
(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT''cv');
define('CSRF_PROTECTION'false);
require_once(
'./global.php');
function 
change_table_engine($engine_from$engine_to$show_output false$test_mode false)
{
      global 
$vbulletin;
      
$engine_from_lc strtolower($engine_from);
      
$engine_to_lc strtolower($engine_to);
      
$tables $vbulletin->db->query_read("SHOW TABLE STATUS");
      while(
$temp $vbulletin->db->fetch_array($tables))
      {
            if(
strtolower($temp['Engine']) == $engine_from_lc AND $engine_from_lc != $engine_to_lc AND !in_array(strtolower($temp['Engine']), array('heap''memory')))
            {
                  if(
$show_output)
                  {
                        print 
"Alter Engine of table: $temp[Name] - $temp[Engine] to $engine_to<br />\n";
                        
vbflush();
                  }
                  if(!
$test_mode)
                  {
                        
$vbulletin->db->query_write("ALTER TABLE " TABLE_PREFIX "{$temp[Name]} ENGINE = $engine_to");
                  }
            }
      }
}
change_table_engine('MyISAM''InnoDB'true);
?>
change args in the line
PHP Code:
change_table_engine('MyISAM''InnoDB'true); 
1 arg = convert FROM
2 arg = convert TO
3 arg = show or no output (optional, default = false)
4 arg = test mode. if set to true - no changes in DB (optional, default = false)

close forum
make Data Base backup
upload file to forum root and execute in browser
confirm chages in DB
delete file
open forum
Reply With Quote
  #21  
Old 01-20-2019, 02:21 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A little update of the script on vb 4.2.x:


PHP Code:
<?php
error_reporting
(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT''cv');
define('CSRF_PROTECTION'false);
require_once(
'./global.php');
function 
change_table_engine($engine_from$engine_to$show_output false$test_mode false)
{
      global 
$vbulletin;
      
$engine_from_lc strtolower($engine_from);
      
$engine_to_lc strtolower($engine_to);
      
$tables $vbulletin->db->query_read("SHOW TABLE STATUS");
      while(
$temp $vbulletin->db->fetch_array($tables))
      {
            if(
strtolower($temp['Engine']) == $engine_from_lc AND $temp[Name] != 'vb_language' AND $engine_from_lc != $engine_to_lc AND !in_array(strtolower($temp['Engine']), array('heap''memory')))
            {
                  if(
$show_output)
                  {
                        print 
"Alter Engine of table: $temp[Name] - $temp[Engine] to $engine_to<br />\n";
                        
vbflush();
                  }
                  if(!
$test_mode)
                  {
                        
$vbulletin->db->query_write("ALTER TABLE " "{$temp[Name]} ENGINE = $engine_to");
                  }
            }
      }
}
change_table_engine('MyISAM''InnoDB'true);
?>
In this way it will exclude vb_language as it should stay in MyISAM.


Aldo this script should be run in AdminCP, not the root!
And if you have some big tables you should manually convert them trough shell console and after that run the script.


Regards!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04769 seconds
  • Memory Usage 2,352KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete