my sql version is 
mysql> select version();
+----------------------+
| version()            |
+----------------------+
| 5.0.24a-standard-log | 
+----------------------+
1 row in set (0.00 sec)

linux kernel  2.6.11.6

Changying Li <[EMAIL PROTECTED]> writes:

> I set a master and a slave, master server is a live server, slave server
> does't online. but I got 1062 error frenquently, especially when I stop
> slave a while and start slave again. following is from my general log:
>
>
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',9788534,UNIX_TIMESTAMP(),110252138)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,time,stat_id) 
> values('visits',8403043,348,NOW(),110252140)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',11839858,UNIX_TIMESTAMP(),110252161)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('comments',11882675,3,110252168)
>                    19 Query       delete from user_stat where 1 AND 
> column_name='last_visit' AND user_id=11839858
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',11839858,UNIX_TIMESTAMP(),110252170)
>                    19 Query       delete from user_stat where 1 AND 
> column_name='last_visit' AND user_id=10731230
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',10731230,UNIX_TIMESTAMP(),110252176)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,time,stat_id) 
> values('visits',9779846,169,NOW(),110252179)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',8499860,UNIX_TIMESTAMP(),110252181)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,time,stat_id) 
> values('visits',8314927,19,NOW(),110252185)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',11636653,UNIX_TIMESTAMP(),110252187)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',11865811,UNIX_TIMESTAMP(),110252189)
>                    19 Query       delete from user_stat where 1 AND 
> column_name='last_visit' AND user_id=8499860
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',8499860,UNIX_TIMESTAMP(),110252192)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',10713080,UNIX_TIMESTAMP(),110252193)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,time,stat_id) 
> values('visits',9477379,490,NOW(),110252194)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',8050753,UNIX_TIMESTAMP(),110252196)
>                    19 Query       delete from user_stat where 1 AND 
> column_name='last_visit' AND user_id=8050753
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',8050753,UNIX_TIMESTAMP(),110252208)
>                    19 Query       insert into user_stat 
> (column_name,user_id,column_value,stat_id) 
> values('last_visit',10944715,UNIX_TIMESTAMP(),110252209)
>
>
> in the first line, the slave insert one record with user_id 9788534, the
> in last line insert a new record again. 
> the user_stat's structure is:
> CREATE TABLE `user_stat` (
>   `stat_id` bigint(20) unsigned NOT NULL,
>   `user_id` mediumint(8) unsigned NOT NULL default '0',
>   `column_name` 
> enum('last_visit','profile_photos','albums','photos','journals','friends','comments','visits','mp3s')
>  NOT NULL default 'last_visit',
>   `column_value` int(10) unsigned NOT NULL default '0',
>   `time` timestamp NOT NULL default CURRENT_TIMESTAMP on update 
> CURRENT_TIMESTAMP,
>   PRIMARY KEY  (`stat_id`),
>   UNIQUE KEY `user_column` (`user_id`,`column_name`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1
>
> so I got dup error at the last line.
>
> I think something is wrong in the process of binlog replication, like,
> the 'delete' sql is discarded. and there are many errors in the error
> log like this:
> 080710 22:41:21 [Warning] Aborted connection 31778 to db: 'data5' user: 
> 'user' host: '56-1.my.com' (Got an error reading communication packets)
>
> so I want to know: what is happen ? how to resolve it ?
>
>
> -- 
>
> Thanks & Regards
>
> Changying Li

-- 

Thanks & Regards

Changying Li


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to