Vuong
Vuong

Reputation: 637

Error #1526 when partitioning table on mysql

Sorry, I don't know English, but I need help :(

I'm using partitioning by LIST COLUMNS by ALTER TABLE statement My table :

table member_list: 
id int,
name varchar(255),
company varchar(255),
cell_phone varchar(20)

It's haven't key I have more than 900.000 records in the current. After inserting, I tried partitioning table by LIST COLUMNS :

alter table member_list
partition by list columns(company)(
    partition p1 values in ('Lavasoft','Cakewalk','Lycos'),
    partition p2 values in ('Adobe','Vivoo','Apple Systems','Sibelius'),
    partition p3 values in ('Finale','Borland','Macromedia','FPT'),
    partition p4 values in ('Chami','Yahoo','Google','Altavista')
)

After runned :

#1526 - Table has no partition for value from column_list

MySQL returned me this error, I can not find support from Oracle page. I hope you will help me. Thanks

Upvotes: 1

Views: 7558

Answers (2)

mcarson
mcarson

Reputation: 3332

#1526 - Table has no partition for value from column_list

The error message is telling you that there is a value in your data in one of the columns you have chosen for partitioning that is not accounted for in your defined partitions.

In this case, there is something in the "company" field that cannot be placed into any of the partitions. For instance, on some record, company="Blackberry." MySQL cannot put this row into any of your partitions.

Upvotes: 3

sizzyfrisky
sizzyfrisky

Reputation: 23

LIST partitioning allow only Integer values. If you want to use columns with varchar partitioning use HASH or KEY PARTITIONS. Besides partition can only be used on columns that have primary or unique attribute.

Upvotes: 1

Related Questions