how can I increase the max key length?

This is a discussion on how can I increase the max key length? within the MySQL Database forums, part of the Database Forums category; Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-03-2005
Sebastian Noack
 
Posts: n/a
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
Reply With Quote
  #2 (permalink)  
Old 11-04-2005
Christian Kirsch
 
Posts: n/a
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.
Reply With Quote
  #3 (permalink)  
Old 11-05-2005
Sebastian Noack
 
Posts: n/a
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
Reply With Quote
  #4 (permalink)  
Old 11-07-2005
Christian Kirsch
 
Posts: n/a
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?
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:51 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0