Why does the first INSERT go through for table2. Note that table2.col_1 is NOT NULL. It doesn\'t insert NULL for col_1, but mysteriously converts the NULL value to an empty
You have MySQL's STRICT mode OFF. Turn it on and you'll get an error.
Otherwise you can test for those warnings with PDO via: http://php.net/manual/en/pdo.errorinfo.php