MySQL Forums
Forum List  »  InnoDB

Re: 3500, 1024, 767 - Maximum Key Length for InnoDB
Posted by: Shaun Moen
Date: May 13, 2008 04:02PM

I'm trying to accomplish something simular. I need to store all our urls for a url analyisis system.

I when I started out recording the urls, I had the byte limit too short, varchar( 500) and found out I need increase it.

I tried:

alter table t1 change pageurl pageurl varchar(2500);
Specified key was too long; max key length is 1000 bytes

I thought to myself, that makes sense... I need to create a partial prefix, then I should be able to change the char limit.

I typed:

alter table t1 drop key pageurl; -success
alter table t1 add key(pageurl(300)); -success

I figured, ok now I have a partial prefix. Then I tried the previous alter table statment again:

alter table t1 change pageurl pageurl varchar(2500);
Specified key was too long; max key length is 1000 bytes

What am I doing wrong?


Also as a side note. If I type:

alter table t1 drop key pageurl; -success


then type:

describe t1;

+---------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+------------------+------+-----+---------+----------------+
| pageurlid | int(11) | NO | MUL | NULL | auto_increment |
| pageurl | varchar(1000) | YES | UNI | NULL | |


the column key still shows a unique index for pageurl? Could this be the problem?



Edited 1 time(s). Last edit at 05/21/2008 12:53PM by Shaun Moen.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: 3500, 1024, 767 - Maximum Key Length for InnoDB
10951
May 13, 2008 04:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.