Replication : request DELETE is not executed on slave

Replication : request DELETE is not executed on slave

am 28.04.2010 11:07:06 von David Florella

------=_NextPart_000_00B5_01CAE6C2.F0CB4E20
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi,



I am using MySQL replication :



- The version of the master is 4.1.12-log

- The version of the slave is 5.0.41



When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < 'xxxxxx'
LIMIT 7500", the query is executed on the master but not on the slave.



Do you know why the request is not executed on the slave?



Regards,



David.


------=_NextPart_000_00B5_01CAE6C2.F0CB4E20--

Re: Replication : request DELETE is not executed on slave

am 28.04.2010 11:15:29 von Krishna Chandra Prajapati

--001636b144b989168104854873a1
Content-Type: text/plain; charset=ISO-8859-1

Hi dflorella,

The important thing about mysql replication is same mysql version for both
master as well as slave should be used. It should be taken as good practice.

You need to check that master and slave are in sync. Is there any error
(replication) on the slave server. Check the mode, strict or some thing
else.

Does the delete command exits in binlog.

Regards,
Krishna


On Wed, Apr 28, 2010 at 2:37 PM, David Florella wrote:

> Hi,
>
>
>
> I am using MySQL replication :
>
>
>
> - The version of the master is 4.1.12-log
>
> - The version of the slave is 5.0.41
>
>
>
> When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < 'xxxxxx'
> LIMIT 7500", the query is executed on the master but not on the slave.
>
>
>
> Do you know why the request is not executed on the slave?
>
>
>
> Regards,
>
>
>
> David.
>
>

--001636b144b989168104854873a1--

RE: Replication : request DELETE is not executed on slave

am 28.04.2010 16:50:32 von David Florella

Hi,=20

In the MySQL documentation, it is written that the two versions are
compatible to make a replication.=20

It seems that if I make a DELETE without the 'LIMIT 7500', the query is
replicated to the slave.

Regards,=20

David.


-----Message d'origine-----
De=A0: Krishna Chandra Prajapati [mailto:prajapatikc@gmail.com]=20
Envoyé : mercredi 28 avril 2010 11:15
À : dflorella@legos.fr
Cc=A0: mysql@lists.mysql.com
Objet=A0: Re: Replication : request DELETE is not executed on slave

Hi dflorella,

The important thing about mysql replication is same mysql version for =
both
master as well as slave should be used. It should be taken as good =
practice.

You need to check that master and slave are in sync. Is there any error
(replication) on the slave server. Check the mode, strict or some thing
else.

Does the delete command exits in binlog.

Regards,
Krishna


On Wed, Apr 28, 2010 at 2:37 PM, David Florella =
wrote:

> Hi,
>
>
>
> I am using MySQL replication :
>
>
>
> - The version of the master is 4.1.12-log
>
> - The version of the slave is 5.0.41
>
>
>
> When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < =
'xxxxxx'
> LIMIT 7500", the query is executed on the master but not on the slave.
>
>
>
> Do you know why the request is not executed on the slave?
>
>
>
> Regards,
>
>
>
> David.
>
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

RE: Replication : request DELETE is not executed on slave

am 28.04.2010 17:24:21 von Jerry Schwartz

>-----Original Message-----
>From: David Florella [mailto:dflorella@legos.fr]
>Sent: Wednesday, April 28, 2010 10:51 AM
>To: mysql@lists.mysql.com
>Cc: 'Krishna Chandra Prajapati'
>Subject: RE: Replication : request DELETE is not executed on slave
>
>Hi,
>
>In the MySQL documentation, it is written that the two versions are
>compatible to make a replication.
>
>It seems that if I make a DELETE without the 'LIMIT 7500', the query is
>replicated to the slave.
>
[JS] This might be my ignorance speaking, but since record order is not
defined for a database how would the slave know WHICH records to delete.

The DELETE... LIMIT 7500 would have to be translated into 7500 separate
DELETEs, and there would have to be some unique way of identifying the
individual records.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com



>Regards,
>
>David.
>
>
>-----Message d'origine-----
>De : Krishna Chandra Prajapati [mailto:prajapatikc@gmail.com]
>Envoyé : mercredi 28 avril 2010 11:15
>À : dflorella@legos.fr
>Cc : mysql@lists.mysql.com
>Objet : Re: Replication : request DELETE is not executed on slave
>
>Hi dflorella,
>
>The important thing about mysql replication is same mysql version for both
>master as well as slave should be used. It should be taken as good practice.
>
>You need to check that master and slave are in sync. Is there any error
>(replication) on the slave server. Check the mode, strict or some thing
>else.
>
>Does the delete command exits in binlog.
>
>Regards,
>Krishna
>
>
>On Wed, Apr 28, 2010 at 2:37 PM, David Florella wrote:
>
>> Hi,
>>
>>
>>
>> I am using MySQL replication :
>>
>>
>>
>> - The version of the master is 4.1.12-log
>>
>> - The version of the slave is 5.0.41
>>
>>
>>
>> When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < 'xxxxxx'
>> LIMIT 7500", the query is executed on the master but not on the slave.
>>
>>
>>
>> Do you know why the request is not executed on the slave?
>>
>>
>>
>> Regards,
>>
>>
>>
>> David.
>>
>>
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=jerry@gii.co.jp





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Replication : request DELETE is not executed on slave

am 28.04.2010 17:49:05 von Tom Worster

16.3.1.9. Replication and LIMIT

Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT
statements is not guaranteed, since the order of the rows affected is not
defined. Such statements can be replicated correctly only if they also
contain an ORDER BY clause.

http://dev.mysql.com/doc/refman/5.0/en/replication-features- limit.html


On 4/28/10 11:24 AM, "Jerry Schwartz" wrote:

>> -----Original Message-----
>> From: David Florella [mailto:dflorella@legos.fr]
>> Sent: Wednesday, April 28, 2010 10:51 AM
>> To: mysql@lists.mysql.com
>> Cc: 'Krishna Chandra Prajapati'
>> Subject: RE: Replication : request DELETE is not executed on slave
>>=20
>> Hi,
>>=20
>> In the MySQL documentation, it is written that the two versions are
>> compatible to make a replication.
>>=20
>> It seems that if I make a DELETE without the 'LIMIT 7500', the query is
>> replicated to the slave.
>>=20
> [JS] This might be my ignorance speaking, but since record order is not
> defined for a database how would the slave know WHICH records to delete.
>=20
> The DELETE... LIMIT 7500 would have to be translated into 7500 separate
> DELETEs, and there would have to be some unique way of identifying the
> individual records.
>=20
> Regards,
>=20
> Jerry Schwartz
> Global Information Incorporated
> 195 Farmington Ave.
> Farmington, CT 06032
>=20
> 860.674.8796 / FAX: 860.674.8341
>=20
> www.the-infoshop.com
>=20
>=20
>=20
>> Regards,
>>=20
>> David.
>>=20
>>=20
>> -----Message d'origine-----
>> De : Krishna Chandra Prajapati [mailto:prajapatikc@gmail.com]
>> Envoyï¿=BD : mercredi 28 avril 2010 11:15
>> ï¿=BD : dflorella@legos.fr
>> Cc : mysql@lists.mysql.com
>> Objet : Re: Replication : request DELETE is not executed on slave
>>=20
>> Hi dflorella,
>>=20
>> The important thing about mysql replication is same mysql version for bo=
th
>> master as well as slave should be used. It should be taken as good pract=
ice.
>>=20
>> You need to check that master and slave are in sync. Is there any error
>> (replication) on the slave server. Check the mode, strict or some thing
>> else.
>>=20
>> Does the delete command exits in binlog.
>>=20
>> Regards,
>> Krishna
>>=20
>>=20
>> On Wed, Apr 28, 2010 at 2:37 PM, David Florella wro=
te:
>>=20
>>> Hi,
>>>=20
>>>=20
>>>=20
>>> I am using MySQL replication :
>>>=20
>>>=20
>>>=20
>>> - The version of the master is 4.1.12-log
>>>=20
>>> - The version of the slave is 5.0.41
>>>=20
>>>=20
>>>=20
>>> When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < 'xxxx=
xx'
>>> LIMIT 7500", the query is executed on the master but not on the slave.
>>>=20
>>>=20
>>>=20
>>> Do you know why the request is not executed on the slave?
>>>=20
>>>=20
>>>=20
>>> Regards,
>>>=20
>>>=20
>>>=20
>>> David.
>>>=20
>>>=20
>>=20
>>=20
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Djerry@gii.co.jp
>=20
>=20
>=20
>=20



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Replication : request DELETE is not executed on slave

am 28.04.2010 17:54:26 von Mattia Merzi

AFAIR you can use LIMIT with replication only if you use row-based
replication (or mixed), that means that you must use mysql 5.1.

Greetings,

Mattia.


2010/4/28 Tom Worster :
> 16.3.1.9. Replication and LIMIT
> Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT
> statements is not guaranteed, since the order of the rows affected is not
> defined. Such statements can be replicated correctly only if they also
> contain an ORDER BY clause.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: Replication : request DELETE is not executed on slave

am 28.04.2010 18:30:20 von David Florella

Hi,=20

Thanks to you and everyone.=20

I will test the same request with the ORDER BY clause.=20

Regards,=20

David.=20

-----Message d'origine-----
De=A0: Mattia Merzi [mailto:mattia.merzi@gmail.com]=20
Envoyé : mercredi 28 avril 2010 17:54
À : mysql@lists.mysql.com
Objet=A0: Re: Replication : request DELETE is not executed on slave

AFAIR you can use LIMIT with replication only if you use row-based
replication (or mixed), that means that you must use mysql 5.1.

Greetings,

Mattia.


2010/4/28 Tom Worster :
> 16.3.1.9. Replication and LIMIT
> Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT
> statements is not guaranteed, since the order of the rows affected is =
not
> defined. Such statements can be replicated correctly only if they also
> contain an ORDER BY clause.

--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: =
http://lists.mysql.com/mysql?unsub=3Ddflorella@legos.fr


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Replication : request DELETE is not executed on slave

am 28.04.2010 19:35:24 von Tom Worster

it's worth a try -- the manual for 4.1 has the same text about ORDER BY in
section 14.7.

On 4/28/10 12:30 PM, "David Florella" wrote:

> Hi,=20
>=20
> Thanks to you and everyone.
>=20
> I will test the same request with the ORDER BY clause.
>=20
> Regards,=20
>=20
> David.=20
>=20
> -----Message d'origine-----
> De=A0: Mattia Merzi [mailto:mattia.merzi@gmail.com]
> Envoyé : mercredi 28 avril 2010 17:54
> À : mysql@lists.mysql.com
> Objet=A0: Re: Replication : request DELETE is not executed on slave
>=20
> AFAIR you can use LIMIT with replication only if you use row-based
> replication (or mixed), that means that you must use mysql 5.1.
>=20
> Greetings,
>=20
> Mattia.
>=20
>=20
> 2010/4/28 Tom Worster :
>> 16.3.1.9. Replication and LIMIT
>> Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT
>> statements is not guaranteed, since the order of the rows affected is no=
t
>> defined. Such statements can be replicated correctly only if they also
>> contain an ORDER BY clause.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg