Lets create table
CREATE TABLE IF NOT EXISTS `test` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`data1` varchar(64) NOT NULL,
`data2` varchar(64) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
and paste some data
INSERT INTO `test` (`data1`) VALUES ('111');
We did not specify data2 but row have been inserted. Value of field data2 is empty string. Why insertion didn't fail? Is it a bug?
mysql Ver 14.14 Distrib 5.6.19, for debian-linux-gnu (x86_64)
show variables like 'sql_mode'your sql_mode probably is set to empty which allows that. but you would get a warning.