MySQL Forums
Forum List  »  Partitioning

Syntax of creating partitions by binary column
Posted by: Andrey Kondakov
Date: March 07, 2007 02:27PM

Hi,

I created simple table under InnoDB engine:

a1 | CREATE TABLE `a1` (
`a` varbinary(16) NOT NULL DEFAULT '',
`b` varchar(20) DEFAULT NULL,
PRIMARY KEY (`a`)
ENGINE=InnoDB DEFAULT CHARSET=latin1

Now I am going to add partitions to my table using alter table statement:
mysql> alter table a1 partition by range(a) (
-> partition p0 values less than (0xba),
-> partition p1 values less than (0xcd)
-> )
-> ;
I get error
ERROR 1064 (42000): VALUES value must be of same type as partition function near '),
partition p1 values less than (0xba)
)' at line 2

Ok, I'm trying to create partitions using hash:
mysql> alter table a1 partition by hash(a)
-> partitions 16
-> ;
I get error
ERROR 1478 (HY000): The PARTITION function returns the wrong type

Where is the problem? Wrong syntax?

Thanks,

Andrey

Options: ReplyQuote


Subject
Views
Written By
Posted
Syntax of creating partitions by binary column
3223
March 07, 2007 02:27PM


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.