MySQL Forums
Forum List  »  Newbie

Re: What does it mean?
Posted by: Russell Dyer
Date: June 25, 2005 01:20AM

The maximum length for a VARCHAR column can be specified as 1 to 255 before MySQL 4.0.2, 0 to 255 as of MySQL 4.0.2, and 0 to 65,535 as of MySQL 5.0.3. (The maximum actual length of a VARCHAR in MySQL 5.0 is determined by the maximum row size and the character set you use. The maximum effective length is 65,532 bytes.) Basically, it seems that your version of MySQL is converting VARCHAR(1000) to a TEXT column type--hence the comment about BLOB/TEXT in the error message.

Only the first several bytes of a column is used when sorting. The number of bytes used is based on the value of the max_sort_length variable for your server. The default value of max_sort_length is 1024. This value can be changed using the --max_sort_length option when starting the mysqld server or with the SET statement.

Relating this background to your question and situation, when you say UNIQUE on a TEXT file, you're suggesting MySQL index on possibly more than the max_sort_length variable amount. It can't and won't do that, thank you very much. At least this is my assessment. I could be totally wrong.

Options: ReplyQuote


Subject
Written By
Posted
June 25, 2005 12:55AM
Re: What does it mean?
June 25, 2005 01:20AM


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.