CREATE TABLE `dummy` ( `a` TINYINT(4) NOT NULL ) ENGINE=MyISAM;
1 wrong value
INSERT INTO `dummy` (`a`) VALUES (NULL); /* SQL Fehler (1048): Column 'a' cannot be null */ /* Nothing is stored! */
2 wrong values
INSERT INTO `dummy` (`a`) VALUES (NULL), (NULL); /* Affected rows: 2 Gefundene Zeilen: 0 Warnungen: 2 Dauer von Abfrage: ... sec. */ SHOW WARNINGS LIMIT 5; /* Not sure where this comes from! Maybe HeidiSQL? */ /* Two entries are stored! */
Why is MySQL raising an error with the single value query, but not at the second query with two values?
Is it related to
SHOW WARNINGS LIMIT 5; But where does this line come from and why is it changing the error type from Error to Warning?