You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Lenny Shovsky <le...@aecom.yu.edu> on 2007/11/14 17:41:06 UTC

replicating awl

I'm running into some trouble getting replication working for AWL
tables, because there are many duplicate entries in AWL.  I tried
creating the table as follows, adding a unique id number, but I got
this error message.

ERROR 1075 (42000) at line 1: Incorrect table definition; there can be
only one auto column and it must be defined as a key

What other column is this 'auto column' ?
 Is it talking about timestamps?  Those are needed to expire stale entries.
Has anyone tried this before ? Any advise ?  Thanks a lot.



CREATE TABLE awl (
  id int(11) NOT NULL AUTO_INCREMENT,
  username varchar(100) NOT NULL default '',
  email varchar(200) NOT NULL default '',
  ip varchar(10) NOT NULL default '',
  count int(11) default '0',
  totscore float default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update
  CURRENT_TIMESTAMP,
  PRIMARY KEY  (username,email,ip,id)
) TYPE=InnoDB;


Re: replicating awl

Posted by SM <sm...@resistor.net>.
At 08:41 14-11-2007, Lenny Shovsky wrote:
>I'm running into some trouble getting replication working for AWL
>tables, because there are many duplicate entries in AWL.  I tried
>creating the table as follows, adding a unique id number, but I got
>this error message.
>
>ERROR 1075 (42000) at line 1: Incorrect table definition; there can be
>only one auto column and it must be defined as a key
>What other column is this 'auto column' ?

Your auto_increment column should be the primary key.

I suggest reading about the (MySQL) issues with auto_increment if you 
are doing replication.

Regards,
-sm