Hi!

You can probably circumvent the problem by
adding an extra VARCHAR column where you put
the first 255 characters of the blob column.
Or maybe you could generate an artificial
primary key with auto-increment, for example?

Regards,

Heikki
http://www.innodb.com

>Hi,
>I tried create table specify "type=InnoDB".with the following script:
>   >create table objects(uri blob not null, primary key uriIndex (uri(255)),
>     classname blob) type=InnoDB;I'm getting the following error
>   ERROR 1073: BLOB column 'uri' can't be used in key specification with
the used \
>table typeThis is what I found in the mySQL docs:
>* Only the MyISAM table type supports indexing on BLOB and TEXT columns.
When putting \
>an index on a BLOB or TEXT column you MUST always specify the length of the
index:
>     CREATE TABLE test (blob_col BLOB, index(blob_col(10)));
>I could change the uri to varchar but...
>* Values in VARCHAR columns are variable-length strings. I can declare a
VARCHAR \
>column to be any length between 1 and 255, just as for CHAR columns.
>That's not very good, we can choose- transactions but uri limited to 255 chars
>- no limit but also no transactions
>Is it supported ? If yes, please let me know how?Any help is welcome.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to