PRIMARY & INDEX both set for column `fk_categorie`

Hi,

I’ve just installed this very nice software and discovered a MySQL bug while importing data with an Open Office Database.
I couldn’t import data in llx_categorie_product table so I went to check it with phpMyadmin (in local).

In the llx_categorie_product table In phpMyadmin I get this error:

PRIMARY and INDEX keys should not both be set for column `fk_categorie`

The table has 2 indexes and 2 keys.

Here is the install data for the table:

create table llx_categorie_product ( fk_categorie integer NOT NULL, fk_product integer NOT NULL )type=innodb;
and for the keys:

[code]
ALTER TABLE llx_categorie_product ADD PRIMARY KEY (fk_categorie, fk_product);
ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_product (fk_product);

ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);[/code]

I use the last version of doliwamp

How should it be change?

Which version of Mysql do you use ?

The Pk is on the couple
And the index are on fields alone. This should be a warning not an error.

You shoul be able to make import despite this, except if there is duplicate content you try to add.

Sorry for late reply.
The MySQL client version: 5.0.45.
I found a way. I’ve just removed the keys, insert the data in the table then put back the keys.

ALTER TABLE llx_element_contact ADD CONSTRAINT fk_element_categorie_fk_categorie FOREIGN KEY (fk_categorie) REFERENCES llx_fk_categorie(rowid)

i actually need help fixing the issue above. I couldn’t import data in llx_categorie_product table

i would be glad if i could get some assistance. Thank you