In the category of terrible, horrible, no good, very bad (but at least documented) software behavior, I bumped into this today: http://bugs.mysql.com/bug.php?id=14770 where the LOAD DATA INFILE command does not respect the default value of a column if no value is supplied in the file. Instead, it assigns zero to numeric columns, empty string to character columns, etc., per http://dev.mysql.com/doc/refman/5.0/en/load-data.html
This is awful! I mean, it's documented behavior and all, but it's still just bloody awful! Has anyone else found a graceful solution to this problem? The thing is, my data files may have "real" zeros in numeric columns, whereas NULL of course is used to indicate an unknown value. When I migrate this application from SQL Server to MySQL in the next couple of weeks, suddenly I'll have a lot of zeros where I previously had NULLs. Dan