Marc,

> Apr 21 13:52:45 texs099 amavis[19951]: (19951) sql: executing clause:
> INSERT INTO msgrcpt (partition_tag, mail_id, rid, ds, rs, bl, wl,
> bspam_level, smtp_resp) VALUES (?,?,?,?,?,?,?,?,?)
> Apr 21 13:52:45 texs099 amavis[19951]: (19951) sql rollback
> Apr 21 13:52:45 texs099 amavis[19951]: (19951) save_info_final: rollback
> done
> Apr 21 13:52:45 texs099 amavis[19951]: (19951) (!)WARN save_info_final:
> sql exec: err=1062, 23000, DBD::mysql::st execute failed: Duplicate
> entry '16' for key 'PRIMARY' at (eval 99) line 166, <GEN80> line 34.

> I think "PRIMARY KEY (partition_tag)" in "CREATE TABLE msgrcpt" is not
> working here.

> CREATE TABLE msgrcpt (
> ...
>    PRIMARY KEY (partition_tag)
> ) ENGINE=InnoDB PARTITION BY LIST (partition_tag) ( ...

Yes, this is wrong. The table msgrcpt does not have a primary key,
nor even any unique key.

If a primary key is necessary for partitioning or for some other
database distribution / optimization purpose, it needs to be
invented. I could add for example a recipient sequence number
(counts recipients within a single message) to a table msgrcpt,
which would make it possible to define a unique key as
(partition_tag,mail_id,rind).

  Mark

------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to