1

I use mysql master-slave replication for backing-up database, but the slave server got the following error after several days:

Last_SQL_Errno: 1292
Last_SQL_Error: Error 'Truncated incorrect DOUBLE value: '29''' on query. Default database: 'my_database'. Query: 'UPDATE `a_table`  SET `name`='xxx',`phone`='xxx',`mch_key`='xxx',`switch`='1',`update_time`=1592612052  WHERE  `id` = '29\'''

It seems that the "column id value 29" is not correct by trailing with two single quote symbol. But I don't know how was this happened. How can I debug this problem?

mysql version: master and slave is same version 5.7.30.

Allen
  • 6,745
  • 5
  • 41
  • 59

1 Answers1

1

The 'Truncated incorrect DOUBLE value' is a misleading error message in MySQL. I have encountered this issue and this SO post helped me to resolve my issue.

In my case, although the value in the where clause looked like a number, it was a string and introducing quotes to the value in the where clause solved the issue since it was actually "varchar".

I hope the content on the SO post linked above (answers and comments by different users) will help to find the cause of your issue! Good luck!

code_kbd
  • 450
  • 4
  • 11