MySQL5.5 does not support current DBalter class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alfa1
    Senior Member
    • Dec 2005
    • 4165
    • 3.8.x

    MySQL5.5 does not support current DBalter class

    This bug was closed because it was duplicated by a vb4 bug. The vb4 bug was fixed, but AFAIK the vb3 bug is still open. Is this correct? I am about to upgrade MySQL to 5.5.17 while I am running vb3.8.7
    Is there a fix that I can apply?

    The issue is:

    In includes/class_dbalter.php, you have:
    PHP Code:
    $this->sql "
                    
    {$this->tag}
                    ALTER TABLE " 
    TABLE_PREFIX $this->db->escape_string($this->table_name) . "
                    TYPE = " 
    $this->db->escape_string(strtoupper($type)); 
    TYPE is deprecated in MySQL 5.5

    Can I simply replace TYPE with ENGINE?
    I buy 420 forums
  • Paul M
    Former Lead Developer
    vB.Com & vB.Org
    • Sep 2004
    • 9886

    #2
    Yes.
    Baby, I was born this way

    Comment

    • Alfa1
      Senior Member
      • Dec 2005
      • 4165
      • 3.8.x

      #3
      Thank you.

      Does TYPE only occur in includes/class_dbalter.php or does it also occur in other files?
      I buy 420 forums

      Comment

      • Paul M
        Former Lead Developer
        vB.Com & vB.Org
        • Sep 2004
        • 9886

        #4
        I dont know on vb3 as I only updated vb 4.1.5.
        Baby, I was born this way

        Comment

        • Alfa1
          Senior Member
          • Dec 2005
          • 4165
          • 3.8.x

          #5
          I found these mentions of TYPE in the following vb3.8.7 files:

          Searching for: TYPE
          admincp\repair.php(157): $vbulletin->db->query_write("ALTER TABLE `$value` TYPE=MyISAM");
          admincp\usertools.php(978): AND TYPE = 'invited'
          includes\class_dbalter.php(441): TYPE = " . $this->db->escape_string(strtoupper($type));
          includes\class_dm_socialgroup.php(253): $enginetype = (version_compare(MYSQL_VERSION, '4.0.18', '<')) ? 'TYPE' : 'ENGINE';
          includes\class_dm_socialgroupmember.php(214): AND TYPE = 'invited'
          includes\functions_wysiwyg.php(563): $listtype = trim(preg_replace('#"?LIST-STYLE-TYPE:\s*([a-z0-9_-]+);?"?#si', '\\1', $longtype));
          includes\cron\attachmentviews.php(26): $enginetype = (version_compare(MYSQL_VERSION, '4.0.18', '<')) ? 'TYPE' : 'ENGINE';
          includes\cron\threadviews.php(26): $enginetype = (version_compare(MYSQL_VERSION, '4.0.18', '<')) ? 'TYPE' : 'ENGINE';

          I see some files have TYPE as well as ENGINE. Do I need to replace TYPE there as well?
          Last edited by Alfa1; Sun 30 Oct '11, 12:36pm.
          I buy 420 forums

          Comment

          • Alfa1
            Senior Member
            • Dec 2005
            • 4165
            • 3.8.x

            #6
            Anyone?
            I buy 420 forums

            Comment

            • Paul M
              Former Lead Developer
              vB.Com & vB.Org
              • Sep 2004
              • 9886

              #7
              The only two you need worry about are ;

              admincp\repair.php(157): $vbulletin->db->query_write("ALTER TABLE `$value` TYPE=MyISAM");
              includes\class_dbalter.php(441): TYPE = " . $this->db->escape_string(strtoupper($type));

              Change TYPE to ENGINE.
              Baby, I was born this way

              Comment

              • Alfa1
                Senior Member
                • Dec 2005
                • 4165
                • 3.8.x

                #8
                Thanks Paul.
                I buy 420 forums

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...