MySQL: Warning: Truncated incorrect DOUBLE value

When install my python script onto a new machine, I found a new warning message which doesn’t appear previously on any machine.

Warning: Truncated incorrect DOUBLE value

—assuming `name` is a CHAR/VARCHAR column
—the following query might cause warnings
SELECT * FROM `t1` WHERE `name` IN (1, 2, 3);
—replace the above with this
SELECT * FROM `t1` WHERE `name` IN (’1′, ’2′, ’3′);
–and the warnings are quite likely to go away

So the problem is because some of the MySQL didn’t quote properly and on some MySQL with stricter config will get it as a warning sign.