I've got a MySQL server running on linux and another on Windows, both containing duplicate copies of a database table. The table is defined like:
parent_id - int(10) - nullable - default=null
title - varchar(100)
I can execute this sql on Linux, and it works fine (I know, it's wrong and horrible and shouldn't work, but it does). Inserting a 0 into in the parent ID, but on Windows an error is thrown saying to use the right syntax near "":
insert into some_table (parent_id, title) values ("", "Some string")
Is there a MySQL setting that tells the Linux version to accept a "" as a valid int?
EDIT
I want it to be known that I agree, making the above work just plain sick. It's wrong in every way - but it's something I have to deal with. I'm tasked with maintaining a poorly written PHP product that depends on the above type of SQL statement being able to execute.
EDIT 2
What's interesting is that in the console, MySQL on Linux throws a warning saying "Incorrect integer value ''" - yet it still inserts the record. MySQL on Windows throws the message but doesn't do the insert. So somehow, MySQL on Linux is setup to ignore errors... does anyone know where this setting resides?