Bug #47880 Equal sign in where clause gets distorted on the slave
Submitted: 6 Oct 2009 22:31 Modified: 28 Feb 2010 8:52
Reporter: Jonathan Salomon Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.39 OS:Linux (CentOS 5.3)
Assigned to: CPU Architecture:Any
Tags: equal sign, replication

[6 Oct 2009 22:31] Jonathan Salomon
Description:
Our application uses MySQL to store binary data in a blob, which gets written to the master correctly. However, quite frequently replication stops, because of the error below. As you may see somehow in the WHERE clause, the equal sign in the 'WHERE ID=1528' gets replaced by a capital G. 

Since the update query is successfully executed on the master, it seems to me this is a replication bug.

Please let me know if you require any additional information.

Last_SQL_Error: Error 'Unknown column 'IDG1528' in 'where clause'' on query. Default database: 'prod'. Query: 'update as_pre_upload set TYPE=2, FILE_NAME='ETL_DEV_20091005_000240.zip', DATE='2009-10-06 12:08:43', DATA='PK\0\\0ÈJE;üðAÒ|Ë©0\0\0ETL_DEV_20091005_000240.xmlÜ]_sêߪý*¦v·6
$!3sî-cÄÿÊ2IÈË!>9ÜC 3sÎçÙ±o÷m˶%
                                lg§jfn·~Ýênµ¤øí¾ÍÐLóO\ráçfùóÉâeýÔ9ýnãûûÍ6MÇU4EW
>Ã7CE¢£|j´Í[¡Ù¼j GÕás³Ùì\\Ý4hY*j\Z.Vì{ÅþÔ°Û/þzAá1vÝUåO\rY¹o ISý§F§      0LK±áEcàFd\ZCëbô¿e\ZC[×- V\rìµdôiI¸\\W­æ5à\ZAó®!pX7[\P¶}ëV(ä>5.žܻL½îLÛîkâàS%âüSCÂãØÍàܾõª]ÖîG\nzºÒ@DIØ%eÃ^mÀ%i;í¸º¨\ZÐe¶ »½ñn>¡                                                                                                                                        ,À,Ö\rîÙ
1 row in set (0.00 sec) ºÍ¶Ðo¢1HÓ®¿]ÓÞ6ÛСJ¨2®Û®@P[Á­J=dJÚ»ð¨üDÕe[e)\\Ò¤!j6RRÞ\nB!mRJB)êa=Zµ¬a¨¹S·¶ß¡ë½yÝl5oö{sC¸ßa¦|cLX´ö$\n?3TØFØ¡(q|Ý        Úy:I#Í  #J¦Ði·©m

How to repeat:
Not sure, but in our application it happens frequently for storing binary data in blobs.
[7 Oct 2009 5:44] Sveta Smirnova
Thank you for the report.

What is value of max_allowed_packet on master and slave? Which binary log format do you use?
[7 Oct 2009 11:30] Jonathan Salomon
We are using the following definition in [mysqld]:

max_allowed_packet = 1G  (on both master and slave)

The binary logs on the master are defined as:

log-bin=mysql-bin
[15 Oct 2009 10:44] Susanne Ebrecht
Please provide output from
$ulimit -a

for the user mysql and for the user who is writing the where clause and for the slave user
[16 Nov 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[8 Dec 2009 16:02] Jonathan Salomon
Sorry for the delay. On both master and slave the max_allowed_packet is set to 1G. As for binary log format we haven't defined anything explicitly so I assume we are using the default statement format.

Thanks!
[8 Dec 2009 16:29] Jonathan Salomon
on master for user mysql

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 137215
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 137215
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Not sure what you mean when you ask me to provide ulimit output for the user who is writing the replication clause and slave user. Those users are mysql users on my setup!?
[29 Jan 2010 8:52] Sveta Smirnova
Thank you for the feedback.

I believe Susanne asked for ulimit for user which runs mysqld on slave.

Please also send us slave error log file.
[1 Mar 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".