>Description:
while replicating MySQL database via creating binlog on one server
and runing slave on another, connected via tcp/ip, we encountered
situation when slave database containing duplicate entries. We found
that number of entries in slave database diverges with time from
number of entries in master database always first exciding second
We had tracked problem to binlog on master which contains duplicate entries
>How-To-Repeat:
master and slave runing MySQL version 2.23.28-gamma
both servers are FreeBSD
Master 4.1
Slave 4.2
Connected via ethernet no firewalls between
Master: recieving stable flow of inserts about couple a second
master running with following params (passwords and other sensitive
information ommited):
/usr/local/mysql.23/bin/safe_mysqld --log-bin --binlog-do-db=historydb
--server-id=10 &
Slave: running with following params
bin/safe_mysqld --server-id=8 --master-host=master.blah.blah
--master-user=repl --master-password=blah --replicate-do-db=historydb
--replicate-ignore-table=historydb.changes
--replicate-ignore-table=historydb.operations --master-port=3306 &
Table to be replicated (not ignored) create statement:
| authtrack | CREATE TABLE `authtrack` (
`authtime` datetime NOT NULL default '0000-00-00 00:00:00',
`uid` bigint(20) NOT NULL default '0',
`session` varchar(33) NOT NULL default '',
`ip_from` varchar(16) NOT NULL default '',
`ip_prox` varchar(16) NOT NULL default '',
`referer` varchar(40) default NULL,
`retpath` varchar(50) default NULL,
`useragent` varchar(50) default NULL,
`login` varchar(20) NOT NULL default '',
`passwd` varchar(20) NOT NULL default '',
`flag` tinyint(3) default NULL,
KEY `authtime`(`authtime`),
KEY `uid`(`uid`),
KEY `session`(`session`),
KEY `login`(`login`)
) TYPE=MyISAM COMMENT='' |
Example of duplicating rows:
e� historydbinsert into authtrack (authtime, uid, session, ip_from, ip_prox, referer,
retpath, useragent, login, passwd, flag) values (from_unixtime(979321349), '463288',
'77bcc9a76aa53519c98373896e7b0266', '194.135.16.100', '',
'http://www.yandex.ru/registration.html', '', 'Mozilla/4.0 (compatible; MSIE 5.5;
Windows 98)', '', '', 1)B_:
e� historydbinsert into authtrack (authtime, uid, session, ip_from, ip_prox, referer,
retpath, useragent, login, passwd, flag) values (from_unixtime(979321349), '463288',
'77bcc9a76aa53519c98373896e7b0266', '194.135.16.100', '',
'http://www.yandex.ru/registration.html', '', 'Mozilla/4.0 (compatible; MSIE 5.5;
Windows 98)', '', '', 1)B_:
>Fix:
unknown
>Submitter-Id: <submitter ID>
>Originator: [EMAIL PROTECTED]
>Organization:
Yandex
>MySQL support: none
>Synopsis: duplicate entries in binlog
>Severity: critical
>Priority: high
>Category: mysql
>Class: sw-bug
>Release: mysql-3.23.28-gamma (Source distribution)
>Environment:
System: FreeBSD master.blah.blah 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Tue Oct 10
19:44:26 MSD 2000 [EMAIL PROTECTED]:/usr/src/sys/compile/HOROVOD i386
Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS=''
LIBC:
-r--r--r-- 1 root wheel 1156956 2 ��� 18:38 /usr/lib/libc.a
lrwxr-xr-x 1 root wheel 9 2 ��� 18:38 /usr/lib/libc.so -> libc.so.4
-r--r--r-- 1 root wheel 553460 2 ��� 18:38 /usr/lib/libc.so.4
Configure command: ./configure --prefix=/usr/local/mysql.23
--localstatedir=/opt/mysql.23 --with-charset=koi8_ru
Perl: This is perl, version 5.005_03 built for i386-freebsd
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php