473,549 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

replication blues


Hi guys,

I've got a weirdo problem with replicating a database. Sometimes I get
some duplicate keys problems for _only_ one table. There is nothing
special about this table, it looks like:

+----------+--------------------------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default |
Extra |
+----------+--------------------------------------+------+-----+---------+----------------+
| id | int(10) unsigned | | PRI | NULL |
auto_increment |
| dialer | int(10) unsigned | YES | | NULL |
|
| uid | int(10) unsigned | | | 0 |
|
| action | enum('REGENERAT E','CREATE','DE LETE') | YES | | NULL |
|
| acc_no | int(10) unsigned | YES | | NULL |
|
| template | int(10) unsigned | YES | | NULL |
|
| name | varchar(20) | YES | | NULL |
|
| status | enum('OKAY','ER ROR') | | | OKAY |
|
+----------+--------------------------------------+------+-----+---------+----------------+
And data is inserted into it with simple inserts, w/o specifing the id
(it's autoincrementin g).

With a little debugging, I have located the problem. If I run 'alter
table xxx auto_increment= 1' on both the master and the slave (this table
is empty at the time on both machines), and then I insert datas into the
master, they look like:

On master:

+----+--------+------+------------+--------+----------+---------------+--------+
| 1 | 3 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 2 | 4 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 3 | 5 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 4 | 6 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 5 | 13 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 6 | 14 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 7 | 18 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 8 | 19 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 9 | 20 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 10 | 21 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
+----+--------+------+------------+--------+----------+------+--------+

But on slave it looks like:

+----+--------+------+------------+--------+----------+------+--------+
| id | dialer | uid | action | acc_no | template | name | status |
+----+--------+------+------------+--------+----------+------+--------+
| 10 | 3 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 11 | 4 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 12 | 5 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 13 | 6 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 14 | 13 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 15 | 14 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 16 | 18 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 17 | 19 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 18 | 20 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
| 19 | 21 | 1007 | REGENERATE | NULL | NULL | NULL | OKAY |
+----+--------+------+------------+--------+----------+------+--------+
Why does it start on the id=10 on the slave? Of course, this is the
cause for the replication failures later on, because datas are deleted on
the master with 'delete from xxx where id=3', for example, action which
doesn't delete anything on the slave (because there is no id=3 entry),
thus inconsistency.

I'm using 4.0.13 on both machines.

Thanks,
bogdan


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1131

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3158
by: Frank | last post by:
Hi, we are using oracle clients (Release 9.0.1.0.1 - Production) on an NT4 (Service Pack6) computers. the server is a W2K, (Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production With the Partitioning option,JServer Release 9.0.1.1.1 - Production) machine. now we are going to update several of those client boxes to a dual processor...
2
3930
by: Cherrish Vaidiyan | last post by:
Hello, I have certain doubts regarding replication of Oracle 9i in Red Hat Linux 9. 1) I want to implement asynchronous/synchronous multimaster replication.I have heard about Replication Management Tool in OEM. What are the steps to be taken initailly for using Replication Management Tool ?
0
2284
by: Cherrish Vaidiyan | last post by:
Frank <fbortel@nescape.net> wrote in message news:<bqgb99$a04$1@news1.tilbu1.nb.home.nl>... > Cherrish Vaidiyan wrote: > > Hello, > > > > I have certain doubts regarding replication of Oracle 9i in Red Hat > > Linux 9. > > > > 1) I want to implement asynchronous/synchronous multimaster > > replication.I have heard about Replication...
6
3867
by: John | last post by:
Hi We have an access app (front-end+backend) running on the company network. I am trying to setup replication for laptop users who go into field and need the data synched between their laptops and the server upon return to the office. I am planning it this; Move all access tables to sql server and then link the tables to access front-end...
3
2397
by: dlesandrini | last post by:
I need advice about my decision to go with Replication in general. This post was placed on the Microsoft Replication newsgroup, but I really value the feedback that comes from this group as well. I have a new client who want their Excel data moved to Access. They have only 4-6 users of this data and a couple of them want to work...
56
5915
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving to a 2nd office 15 minutes down the road. Only one office will be open at a time, so theoretically it'd be possible to copy the back-end manually...
9
3915
by: David W. Fenton | last post by:
See: Updated version of the Microsoft Jet 4.0 Service Pack 8 replication files is available in the Download Center http://support.microsoft.com/?scid=kb;en-us;321076 This includes the Jet 4 synchronizer. This allows anyone to do indirect replication, even without
3
4535
by: Gert van der Kooij | last post by:
Hi, Our SQL Replication is between DB2 databases on Windows servers. I'm searching for the document which tells me how to migrate our SQL Replication environment from V8 to V9 (we also need to migrate from V7 to V8 but that's fully described so that's no problem). The PDF 'Migrating to Replication Version 9' doesn't contain a description...
2
4218
by: Query Builder | last post by:
Hi, I have transactional replication set up on on of our MS SQL 2000 (SP4) Std Edition database server Because of an unfortunate scenario, I had to restore one of the publication databases. I scripted the replication module and dropped the publication first. Then did a full restore. When I try to set up the replication thru the script,...
0
7524
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7960
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6048
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5372
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.