MySQL Forums
Forum List  »  Partitioning

partition with UTF8 varchar
Posted by: Rafael Turk
Date: January 28, 2007 08:27AM

Hi All,

I’m trying to create the following table:

CREATE TABLE webgram (
A varchar(250) COLLATE utf8_unicode_ci NOT NULL,
B varchar(250) COLLATE utf8_unicode_ci NOT NULL,
KEY keyA (A)
)

ENGINE=MyISAM
DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci

PARTITION BY RANGE(ORD(A))
(
PARTITION p0 VALUES LESS THAN(30),
PARTITION p1 VALUES LESS THAN(31),
PARTITION p2 VALUES LESS THAN(32),
PARTITION p3 VALUES LESS THAN(33),
PARTITION p4 VALUES LESS THAN(34),
PARTITION p5 VALUES LESS THAN MAXVALUE
)

I’m getting the following error message:

ERROR 1552 (HY000): This partition function is not allowed

Witch is related to the ORD function, witch is not allowed???

But I’ve checked the MySQL 5.1 manual for limitations:

(See: http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html)

“ Beginning with MySQL 5.1.12, only the following MySQL functions are specfically supported in partitioning expressions:

ORD()


Since ORD returns an integer based on the leftmost characters of the varchar field I think it should be allowed in RANGE partitioning.


I´m using MySQL-server-5.1.14-0.glibc23

Any help?

Options: ReplyQuote


Subject
Views
Written By
Posted
partition with UTF8 varchar
5465
January 28, 2007 08:27AM
2707
January 29, 2007 03:52AM


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.