My insert statement looks like this:
INSERT INTO foo (bar) VALUES (\'\');
The bar
field was created like so:
bar I
MySQL by default attempts to coerce invalid values for a column to the correct type. Here, the empty string ''
is of type string, which is neither an integer nor NULL. I suggest taking the following steps:
INSERT INTO foo (bar) VALUES (NULL);