1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Issue Mysqli statement execute error: Specified key was too long; max key len is 767 bytes

Discussion in 'Resolved Bug Reports' started by Romchik®, Sep 10, 2011.

  1. Romchik®

    Romchik® Well-Known Member

    Possible XF bug or Server Problem?

    MySQL: 6.0
    XF Test - passed
     
    Gatses likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    Do you know what the last created table was? (As it will be the next one that caused the error.)
     
  3. Romchik®

    Romchik® Well-Known Member

    I'm not sure. This is not my forum. But seems xf_feed is last table.
     
  4. ragtek

    ragtek Guest

    Isn't this because of
    PHP:
    $tables['xf_feed'] = "
        CREATE TABLE xf_feed (
            feed_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
            title VARCHAR(250) NOT NULL,
            url VARCHAR(2083) NOT NULL,
            frequency INT UNSIGNED NOT NULL DEFAULT 1800,
            node_id INT UNSIGNED NOT NULL,
            user_id INT UNSIGNED NOT NULL DEFAULT 0,
            title_template VARCHAR(250) NOT NULL DEFAULT '',
            message_template MEDIUMTEXT NOT NULL,
            discussion_visible TINYINT UNSIGNED NOT NULL DEFAULT 1,
            discussion_open TINYINT UNSIGNED NOT NULL DEFAULT 1,
            discussion_sticky TINYINT UNSIGNED NOT NULL DEFAULT 0,
            last_fetch INT UNSIGNED NOT NULL DEFAULT 0,
            active INT UNSIGNED NOT NULL DEFAULT 0,
            PRIMARY KEY (feed_id),
            KEY active (active)
        ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
    "
    ;
    url VARCHAR(2083) NOT NULL,

    http://dev.mysql.com/doc/refman/5.0/en/char.html
    And xf requires
    • MySQL: 5.0+

    This doesn't work for mysql <= 5.0.3, right?
     
  5. Mike

    Mike XenForo Developer Staff Member

    This is a bug really - it's the xf_feed_log table. I'm unsure why we haven't run into it before. What version of MySQL? (6.0 can't be accurate...) it looks like ideally we need to shorten the columns a bit. (I could change them to binary potentially, though there is the risk of UTF-8 characters being truncated too earlier.)

    I think as a workaround you could make the table MyISAM instead of InnoDB, but I will likely shorten the column a bit for 1.1.
     
  6. Romchik®

    Romchik® Well-Known Member

    6.0.6 - alpha-community
     
  7. Mike

    Mike XenForo Developer Staff Member

    That is a really really old alpha then. They switched away from that version number 2 years ago: http://lists.mysql.com/packagers/418

    I don't think that we can really support an alpha like that.
     
    Vincent likes this.

Share This Page