I ran into an issue inserting data into a table where a given tinyint value was NULL, and there is a NOT NULL constraint on the corresponding column in SingleStore.
However, the column does have a default value; it’s defined like:
`foo` tinyint(1) NOT NULL DEFAULT 0
When inserting, the following error is returned: NULL supplied to NOT NULL column 'foo' at row 122058
Shouldn’t it default to 0 instead of erroring out?
I have also had this occur when the NOT NULL column is the shard key, even with a default value set. When / how is the DEFAULT value used?