Thursday, 20 August 2009

MySQL - its so touchy feely

Having been an Oracle sort of person (well and TransactSQL) I find myself banging my head against the screen with MySQL's cute traits. For example

I have a web application which is paired to a MySQL database. I've used the INNODB engine to enable transactions (ACID is a requirement) and I just managed to insert a NULL into a table with a NOT NULL constraint and it swallowed it.

perplexed I consulted the manual, this is apparently the default behavior.:

whenever you insert an “incorrect” value into a column, such as a NULL into a NOT NULL best possible value” instead of producing an error column

I'm so glad that MySQL can guess what is the best possible value for the "Library of Congress number" for the book.


It seems that you must use "strict" mode for it to behave properly ... isn't that just like kids

No comments:

Post a Comment