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 .


---------

From: http://dev.mysql.com/doc/mysql/en/TODO_MySQL_5.0.html

Standards compliance, portability and migration
* Support for Data Dictionary / INFORMATION_SCHEMA .
* Add true VARCHAR support (column lengths longer than 255, and no stripping of trailing whitespace). There is already support for this in the MyISAM storage engine, but it is not yet available at the user level.


From: http://dev.mysql.com/doc/mysql/en/TODO_future.html

Standards compliance, portability and migration
* 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 .
* Add ANY() ,EVERY() , and SOME() group functions. In standard SQL, these work only on boolean columns, but we can extend these to work on any columns or expressions by treating a value of zero as FALSE and non-zero values as TRUE.
* Fix the type of MAX(column) to be the same as the column type:
mysql> CREATE TABLE t1 (a DATE);
mysql> INSERT INTO t1 VALUES (NOW());
mysql> CREATE TABLE t2 SELECT MAX(a) FROM t1;
mysql> SHOW COLUMNS FROM t2;


From: http://dev.mysql.com/doc/mysql/en/TODO_unplanned.html

We aim toward full compliance with ANSI/ISO SQL. There are no features we plan not to implement.

--------------

In short, MySQL plans to change anything that differs from the SQL standard so that it is compliant. And I commend them for this. Treating DEFAULT the wrong way is just one kind of data integrity problem that can result otherwise.

-- Darren Duncan

Reply via email to