On Sun, 29 Aug 2004 20:50:05 -0700, Darren Duncan <[EMAIL PROTECTED]> wrote:

At 8:09 PM -0700 8/29/04, Jonathan Leffler wrote:
Darren Duncan wrote:
At 6:53 PM -0400 8/29/04, Paul G. Weiss wrote:
MySQL works just as you describe.
-P
Even so, it is on the MySQL to-do list that such non-standard behaviour is going to be changed. Hopefully sooner rather than later. -- Darren
Why break a perfectly sensible system?

I'll quote some sections from the MySQL TODO, to illustrate what I'm saying. Pay particular attention to:
* Don't add automatic DEFAULT values to columns. Produce an error for any INSERT statement that is missing a value for a column that has no DEFAULT .



My read of this statement does not rule out the current behavior of allowing default values for nullable columns. Instead it would prevent:


  create table foo (a varchar null, bar integer not null)

from silently becoming

  create table foo (a varchar null, bar integer not null default 0)

as it does now, and so

  insert into foo (a) values ("x")

would be considered an error, rather than an insert of ("x",0) as it is now.




Reply via email to