Ask a Question related to MySQL, Design and Development.
-
Sebastian Noack #1
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
-
Length cannot be less than zero. Parameter name: length
I receive the following error when I try to run this asp.net 1.1 app: Length cannot be less than zero. Parameter name: length Description: An... -
Increase Row Height
Does anyone know how i can increase the height of the rows in a datagrid? -
Increase by 1
Hello all, I'm writing a small time tracking application and i've run into a small problem. I have a textbox that displays the number of hours a... -
How to get length of string? length() problems
Simplified a bit, I'm parsing HTML documents to get sentences e.g. my $html = get($URL); # remove all HTML TAGs...blah blah blah @sentences =... -
How to increase memory?
Hi, I have Adobe Photoshop Elements version 2, an iMac with OS 9.1, and 320 MB RAM. I would like to increase the memory allocated to Adobe... -
Christian Kirsch #2
Re: how can I increase the max key length?
Sebastian Noack wrote:
Use the source, Luke.> 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.
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
-
Sebastian Noack #3
Re: how can I increase the max key length?
> Although I'd discourage using keys that long - what's the point? If you
Like I said, I only try to install mediawiki. But I have find out that the> 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.
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
-
Christian Kirsch #4
Re: how can I increase the max key length?
Sebastian Noack wrote:
Do you notice *any* key in this query that's longer than 255+128 = 383>>>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?
bytes? I don't, but then I'm myopic. Maybe you could post the exact
error message?
Christian Kirsch Guest
-
Unregistered #5
Re: how can I increase the max key length?
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



Reply With Quote


