Professional Web Applications Themes

how can I increase the max key length? - MySQL

Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key was too long; max key length is 1000 bytes". How can I allow keys longer than 1000 bytes? I use mysql-4.1.14 from gentoo-portage. Best regards Sebastian Noack...

  1. #1

    Default how can I increase the max key length?

    Hi,

    if I try to install mediawiki, I get following mysql-error, during running
    config/index.php: "Specified key was too long; max key length is 1000
    bytes". How can I allow keys longer than 1000 bytes? I use mysql-4.1.14
    from gentoo-portage.

    Best regards
    Sebastian Noack
    Sebastian Noack Guest

  2. #2

    Default Re: how can I increase the max key length?

    Sebastian Noack wrote:
    > Hi,
    >
    > if I try to install mediawiki, I get following mysql-error, during running
    > config/index.php: "Specified key was too long; max key length is 1000
    > bytes". How can I allow keys longer than 1000 bytes? I use mysql-4.1.14
    > from gentoo-portage.
    Use the source, Luke.

    Although I'd discourage using keys that long - what's the point? If you
    need a key that is longer than 1000 bytes, it takes a lot of time to
    figure out if a key matches a condition. If the keys are substrings of
    blobs, there is not much point to it anyway. Unless you are storing
    text, in which case a fulltext index would be appropriate.
    Christian Kirsch Guest

  3. #3

    Default Re: how can I increase the max key length?

    > Although I'd discourage using keys that long - what's the point? If you
    > need a key that is longer than 1000 bytes, it takes a lot of time to
    > figure out if a key matches a condition. If the keys are substrings of
    > blobs, there is not much point to it anyway. Unless you are storing
    > text, in which case a fulltext index would be appropriate.
    Like I said, I only try to install mediawiki. But I have find out that the
    following SQL-Query occurs the error:

    CREATE TABLE categorylinks ( cl_from int(8) unsigned NOT NULL default '0',
    cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(255)
    binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY
    cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY
    cl_timestamp(cl_to,cl_timestamp) )

    But because I don't have designed the db-structure by my own, I would
    prefer to don't alter it. So I ask again, is there a way to increase the
    max length for keys?

    Best regards
    Sebastian Noack
    Sebastian Noack Guest

  4. #4

    Default Re: how can I increase the max key length?

    Sebastian Noack wrote:
    >>Although I'd discourage using keys that long - what's the point? If you
    >>need a key that is longer than 1000 bytes, it takes a lot of time to
    >>figure out if a key matches a condition. If the keys are substrings of
    >>blobs, there is not much point to it anyway. Unless you are storing
    >>text, in which case a fulltext index would be appropriate.
    >
    >
    > Like I said, I only try to install mediawiki. But I have find out that the
    > following SQL-Query occurs the error:
    >
    > CREATE TABLE categorylinks ( cl_from int(8) unsigned NOT NULL default '0',
    > cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(255)
    > binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY
    > cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY
    > cl_timestamp(cl_to,cl_timestamp) )
    >
    > But because I don't have designed the db-structure by my own, I would
    > prefer to don't alter it. So I ask again, is there a way to increase the
    > max length for keys?
    Do you notice *any* key in this query that's longer than 255+128 = 383
    bytes? I don't, but then I'm myopic. Maybe you could post the exact
    error message?
    Christian Kirsch Guest

  5. #5

    Default Re: how can I increase the max key length?

    Quote Originally Posted by Christian Kirsch View Post
    Sebastian Noack wrote:

    Do you notice *any* key in this query that's longer than 255+128 = 383
    bytes? I don't, but then I'm myopic. Maybe you could post the exact
    error message?
    Multiply that by 3 since it's a UTF-8 database and you're over 1000 BYTES. It's been incredibly frustrating looking for a way to install programs, in my case Quartz, that _require_ tables with keys greater than 1000 bytes. It's so annoying when people "help" by being smart enough to tell us we shouldn't be using long keys, while being dumb enough not to actually read the question and notice that we have no choice!
    Unregistered Guest

Similar Threads

  1. Length cannot be less than zero. Parameter name: length
    By ctk70 in forum ASP.NET Security
    Replies: 3
    Last Post: November 14th, 02:34 PM
  2. Increase Row Height
    By viseur in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: December 1st, 10:17 PM
  3. Increase by 1
    By rmethod1234 in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: February 29th, 08:00 PM
  4. How to get length of string? length() problems
    By Mitchua in forum PERL Modules
    Replies: 5
    Last Post: July 17th, 12:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139